aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-03-13 15:53:12 +0000
committerDaniel Jasper <djasper@google.com>2013-03-13 15:53:12 +0000
commit6050a1e53aa3cd3b21d65d440413af5a5ac1d466 (patch)
tree57c944eeb74198b6b720f9ddc4cb3da7897f1210 /unittests/Format/FormatTest.cpp
parent8d0d19aa33751d89390e6a2bb2c2b19def287abe (diff)
Fix comment indentation before labels.
Before: switch (x) { // if 1, do f() case 1: f(); } After: switch (x) { // if 1, do f() case 1: f(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 79163a6818..17aeacae5c 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -427,6 +427,11 @@ TEST_F(FormatTest, FormatsSwitchStatement) {
"default: {\n"
" // Do nothing.\n"
"}");
+ verifyFormat("switch (x) {\n"
+ "// if 1, do f()\n"
+ "case 1:\n"
+ " f();\n"
+ "}");
verifyGoogleFormat("switch (x) {\n"
" case 1:\n"