]> granicus.if.org Git - clang/commitdiff
Add regression test.
authorManuel Klimek <klimek@google.com>
Mon, 21 Jan 2013 14:16:56 +0000 (14:16 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 21 Jan 2013 14:16:56 +0000 (14:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173042 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Format/FormatTest.cpp

index 4725889247e04b329ecaeb6865fbe347a259b7f1..f8c454b7bc6d5513cbf8c37cfa6f5a08bfb9e97a 100644 (file)
@@ -1573,6 +1573,13 @@ TEST_F(FormatTest, MergeHandlingInTheFaceOfPreprocessorDirectives) {
                "  f();                  \\\n"
                "  if (true)\n"
                "g();", ShortMergedIf);
+  verifyFormat("{\n"
+               "#ifdef A\n"
+               "  // Comment\n"
+               "  if (true) continue;\n"
+               "#endif\n"
+               "  // Comment\n"
+               "  if (true) continue;", ShortMergedIf);
 }
 
 //===----------------------------------------------------------------------===//