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.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp b/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
index 09f21929c37..c24894e7d4e 100644
--- a/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
+++ b/clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp
@@ -345,6 +345,18 @@ TEST_F(NamespaceEndCommentsFixerTest,
"}\n"
"}\n"));
}
+
+TEST_F(NamespaceEndCommentsFixerTest,
+ DoesNotAddEndCommentForUnbalancedRBracesAfterNamespaceEnd) {
+ EXPECT_EQ("namespace {\n"
+ " int i;\n"
+ "} // namespace\n"
+ "}",
+ fixNamespaceEndComments("namespace {\n"
+ " int i;\n"
+ "} // namespace\n"
+ "}"));
+}
} // end namespace
} // end namespace format
} // end namespace clang
OpenPOWER on IntegriCloud