aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 4d860c1f65..e75d61e662 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/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"