summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestObjC.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:11:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:11:37 +0000
commit461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch)
tree6942083d7d56bba40ec790a453ca58ad3baf6832 /unittests/Format/FormatTestObjC.cpp
parent75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff)
Diffstat (limited to 'unittests/Format/FormatTestObjC.cpp')
-rw-r--r--unittests/Format/FormatTestObjC.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestObjC.cpp b/unittests/Format/FormatTestObjC.cpp
index 1f9fc451d213..4220b44b4c47 100644
--- a/unittests/Format/FormatTestObjC.cpp
+++ b/unittests/Format/FormatTestObjC.cpp
@@ -79,6 +79,17 @@ TEST(FormatTestObjCStyle, DetectsObjCInHeaders) {
ASSERT_TRUE((bool)Style);
EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language);
+ Style = getStyle("LLVM", "a.h", "none", "@interface\n"
+ "@end\n"
+ "//comment");
+ ASSERT_TRUE((bool)Style);
+ EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language);
+
+ Style = getStyle("LLVM", "a.h", "none", "@interface\n"
+ "@end //comment");
+ ASSERT_TRUE((bool)Style);
+ EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language);
+
// No recognizable ObjC.
Style = getStyle("LLVM", "a.h", "none", "void f() {}");
ASSERT_TRUE((bool)Style);