summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 2969e568ebc..48b1f63fcad 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5704,15 +5704,15 @@ TEST_F(FormatTest, CountsUTF8CharactersProperly) {
verifyFormat("\"Однажды в студёную зимнюю пору...\"",
getLLVMStyleWithColumns(35));
verifyFormat("\"一 二 三 四 五 六 七 八 九 十\"",
- getLLVMStyleWithColumns(21));
+ getLLVMStyleWithColumns(31));
verifyFormat("// Однажды в студёную зимнюю пору...",
getLLVMStyleWithColumns(36));
verifyFormat("// 一 二 三 四 五 六 七 八 九 十",
- getLLVMStyleWithColumns(22));
+ getLLVMStyleWithColumns(32));
verifyFormat("/* Однажды в студёную зимнюю пору... */",
getLLVMStyleWithColumns(39));
verifyFormat("/* 一 二 三 四 五 六 七 八 九 十 */",
- getLLVMStyleWithColumns(25));
+ getLLVMStyleWithColumns(35));
}
TEST_F(FormatTest, SplitsUTF8Strings) {
@@ -5723,11 +5723,12 @@ TEST_F(FormatTest, SplitsUTF8Strings) {
"\"пору,\"",
format("\"Однажды, в студёную зимнюю пору,\"",
getLLVMStyleWithColumns(13)));
- EXPECT_EQ("\"一 二 三 四 \"\n"
- "\"五 六 七 八 \"\n"
- "\"九 十\"",
- format("\"一 二 三 四 五 六 七 八 九 十\"",
- getLLVMStyleWithColumns(10)));
+ EXPECT_EQ("\"一 二 三 \"\n"
+ "\"四 五六 \"\n"
+ "\"七 八 九 \"\n"
+ "\"十\"",
+ format("\"一 二 三 四 五六 七 八 九 十\"",
+ getLLVMStyleWithColumns(11)));
}
TEST_F(FormatTest, SplitsUTF8LineComments) {
@@ -5739,9 +5740,9 @@ TEST_F(FormatTest, SplitsUTF8LineComments) {
getLLVMStyleWithColumns(13)));
EXPECT_EQ("// 一二三\n"
"// 四五六七\n"
- "// 八\n"
- "// 九 十",
- format("// 一二三 四五六七 八 九 十", getLLVMStyleWithColumns(6)));
+ "// 八 九\n"
+ "// 十",
+ format("// 一二三 四五六七 八 九 十", getLLVMStyleWithColumns(9)));
}
TEST_F(FormatTest, SplitsUTF8BlockComments) {
@@ -5758,16 +5759,17 @@ TEST_F(FormatTest, SplitsUTF8BlockComments) {
getLLVMStyleWithColumns(13)));
EXPECT_EQ("/* 一二三\n"
" * 四五六七\n"
- " * 八\n"
- " * 九 十\n"
- " */",
- format("/* 一二三 四五六七 八 九 十 */", getLLVMStyleWithColumns(6)));
+ " * 八 九\n"
+ " * 十 */",
+ format("/* 一二三 四五六七 八 九 十 */", getLLVMStyleWithColumns(9)));
EXPECT_EQ("/* 𝓣𝓮𝓼𝓽 𝔣𝔬𝔲𝔯\n"
" * 𝕓𝕪𝕥𝕖\n"
" * 𝖀𝕿𝕱-𝟠 */",
format("/* 𝓣𝓮𝓼𝓽 𝔣𝔬𝔲𝔯 𝕓𝕪𝕥𝕖 𝖀𝕿𝕱-𝟠 */", getLLVMStyleWithColumns(12)));
}
+#endif // _MSC_VER
+
TEST_F(FormatTest, FormatsWithWebKitStyle) {
FormatStyle Style = getWebKitStyle();
@@ -5847,7 +5849,5 @@ TEST_F(FormatTest, FormatsWithWebKitStyle) {
format("if (aaaaaaaaaaaaaaa || bbbbbbbbbbbbbbb) { i++; }", Style));
}
-#endif
-
} // end namespace tooling
} // end namespace clang
OpenPOWER on IntegriCloud