summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index eacd189840f..18a1a008582 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1702,6 +1702,14 @@ TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) {
"\n"
" A() {\n}\n"
"} ;"));
+ EXPECT_EQ("SOME_MACRO\n"
+ "namespace {\n"
+ "void f();\n"
+ "}",
+ format("SOME_MACRO\n"
+ " namespace {\n"
+ "void f( );\n"
+ "}"));
// Only if the identifier contains at least 5 characters.
EXPECT_EQ("HTTP f();",
format("HTTP\nf();"));
OpenPOWER on IntegriCloud