aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-02-06 16:08:09 +0000
committerManuel Klimek <klimek@google.com>2013-02-06 16:08:09 +0000
commit7fc2db0acd3fb0f38db19764eef137ae3a9edc9f (patch)
tree58f84a07756a93f532ee681711bff169a2f9c6df /unittests/Format/FormatTest.cpp
parent9e9e6e0297a96e237b53e6be433749065bcea5f8 (diff)
Much semicolon after namespaces.
We now leave the semicolon in the line of the closing brace in: namespace { ... }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp9
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) {