aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index fb5221ee24..114359d04d 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1682,6 +1682,16 @@ TEST_F(FormatTest, BlockComments) {
TEST_F(FormatTest, FormatStarDependingOnContext) {
verifyFormat("void f(int *a);");
verifyFormat("void f() { f(fint * b); }");
+ verifyFormat("class A {\n void f(int *a);\n};");
+ verifyFormat("class A {\n int *a;\n};");
+ verifyFormat("namespace a {\n"
+ "namespace b {\n"
+ "class A {\n"
+ " void f() {}\n"
+ " int *a;\n"
+ "};\n"
+ "}\n"
+ "}");
}
TEST_F(FormatTest, SpecialTokensAtEndOfLine) {