From: Alexander Kornienko Date: Wed, 16 Jan 2013 11:45:16 +0000 (+0000) Subject: Clang Format: A couple of tests for the trailing stuff case X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51c23fa34bb29b77fc0867b233147d3427757573;p=clang Clang Format: A couple of tests for the trailing stuff case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172607 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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"