aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-21 14:16:56 +0000
committerManuel Klimek <klimek@google.com>2013-01-21 14:16:56 +0000
commit0fbe0087d2558c509dcfdb4b593b844625c2dd3d (patch)
tree5e71e0ff0dbdf3ff978a35e38d82a5e5f257de9d /unittests/Format/FormatTest.cpp
parent6de6aab8248ef67d3a65018d4ad26f51ac35b3d3 (diff)
Add regression test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 4725889247..f8c454b7bc 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -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);
}
//===----------------------------------------------------------------------===//