diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index c2e845b9be..4dc6ea7592 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -617,6 +617,15 @@ TEST_F(FormatTest, FormatsNamespaces) { verifyFormat("using namespace some_namespace;\n" "class A {\n};\n" "void f() { f(); }"); + + // This code is more common than we thought; if we + // layout this correctly the semicolon will go into + // its own line, which is undesireable. + verifyFormat("namespace {\n};"); + verifyFormat("namespace {\n" + "class A {\n" + "};\n" + "};"); } TEST_F(FormatTest, FormatsExternC) { |