summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-01-16 11:45:16 +0000
committerAlexander Kornienko <alexfh@google.com>2013-01-16 11:45:16 +0000
commitae6e53c15db2264799e91298b8f4d703b2fd0842 (patch)
treee62fd6eb308b3ca231b2b75f8e944edadd43d551 /clang/unittests/Format/FormatTest.cpp
parent1231e066a838eb892eeeee380514589f79dc9c51 (diff)
downloadbcm5719-llvm-ae6e53c15db2264799e91298b8f4d703b2fd0842.tar.gz
bcm5719-llvm-ae6e53c15db2264799e91298b8f4d703b2fd0842.zip
Clang Format: A couple of tests for the trailing stuff case
llvm-svn: 172607
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 4d860c1f656..e75d61e662b 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1213,6 +1213,12 @@ TEST_F(FormatTest, HandlesIncludeDirectives) {
//===----------------------------------------------------------------------===//
TEST_F(FormatTest, IncorrectCodeTrailingStuff) {
+ verifyFormat("void f() { return; }\n42");
+ verifyFormat("void f() {\n"
+ " if (0)\n"
+ " return;\n"
+ "}\n"
+ "42");
verifyFormat("void f() { return }\n42");
verifyFormat("void f() {\n"
" if (0)\n"
OpenPOWER on IntegriCloud