Clang Format: A couple of tests for the trailing stuff case
authorAlexander Kornienko <alexfh@google.com>
Wed, 16 Jan 2013 11:45:16 +0000 (11:45 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 16 Jan 2013 11:45:16 +0000 (11:45 +0000)
llvm-svn: 172607

clang/unittests/Format/FormatTest.cpp

index 4d860c1..e75d61e 100644 (file)
@@ -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"