summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp')
-rw-r--r--clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp b/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
index 28212f8524d..0341fd7ef44 100644
--- a/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
+++ b/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
@@ -388,6 +388,24 @@ TEST_F(NamespaceEndCommentsFixerTest,
" int i;\n"
"}\n"
"}\n"));
+ EXPECT_EQ("namespace {\n"
+ " int i;\n"
+ " int j;\n"
+ "}// namespace\n"
+ "#if A\n"
+ " int i;\n"
+ "#else\n"
+ " int j;\n"
+ "#endif",
+ fixNamespaceEndComments("namespace {\n"
+ " int i;\n"
+ " int j;\n"
+ "}\n"
+ "#if A\n"
+ " int i;\n"
+ "#else\n"
+ " int j;\n"
+ "#endif"));
}
TEST_F(NamespaceEndCommentsFixerTest,
OpenPOWER on IntegriCloud