aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-03-19 18:33:58 +0000
committerDaniel Jasper <djasper@google.com>2013-03-19 18:33:58 +0000
commitc30eb51b639e132af458fbf7647eefae6edb93ac (patch)
treed0724c5eafeec3251d6a21294aed2ead9b191da1 /unittests
parentfd44d34ab626a19819ad0e87a03e4bf014ec94fd (diff)
downloadclang-c30eb51b639e132af458fbf7647eefae6edb93ac.tar.gz
Fix indentation for case: // comment.
Before: switch (x) { case 1: // Do amazing stuff { g(); f(); } } After: switch (x) { case 1: // Do amazing stuff { g(); f(); } } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index a3afbee916..a940f7092f 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -432,6 +432,15 @@ TEST_F(FormatTest, FormatsSwitchStatement) {
"case 1:\n"
" f();\n"
"}");
+ verifyFormat("switch (x) {\n"
+ "case 1:\n"
+ " // Do amazing stuff\n"
+ " {\n"
+ " f();\n"
+ " g();\n"
+ " }\n"
+ " break;\n"
+ "}");
verifyGoogleFormat("switch (x) {\n"
" case 1:\n"