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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index eaa31b1ebfa..1c68d67956c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2192,6 +2192,13 @@ TEST_F(FormatTest, FormatsNamespaces) {
"} // my_namespace\n"
"#endif // HEADER_GUARD"));
+ EXPECT_EQ("namespace A::B {\n"
+ "class C {};\n"
+ "}",
+ format("namespace A::B {\n"
+ "class C {};\n"
+ "}"));
+
FormatStyle Style = getLLVMStyle();
Style.NamespaceIndentation = FormatStyle::NI_All;
EXPECT_EQ("namespace out {\n"
OpenPOWER on IntegriCloud