diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index a603012ccf4..3dd9fc00f68 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -999,6 +999,24 @@ TEST_F(FormatTest, FormatsSwitchStatement) { " }\n" "});", getLLVMStyle())); + EXPECT_EQ("switch (n) {\n" + "case 0: {\n" + " return false;\n" + "}\n" + "default: {\n" + " return true;\n" + "}\n" + "}", + format("switch (n)\n" + "{\n" + "case 0: {\n" + " return false;\n" + "}\n" + "default: {\n" + " return true;\n" + "}\n" + "}", + getLLVMStyle())); verifyFormat("switch (a) {\n" "case (b):\n" " return;\n" |

