diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestObjC.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestObjC.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTestObjC.cpp b/clang/unittests/Format/FormatTestObjC.cpp index b1e289d89b6..8fb93195881 100644 --- a/clang/unittests/Format/FormatTestObjC.cpp +++ b/clang/unittests/Format/FormatTestObjC.cpp @@ -114,7 +114,12 @@ TEST(FormatTestObjCStyle, DetectsObjCInHeaders) { EXPECT_EQ(FormatStyle::LK_Cpp, Style->Language); Style = - getStyle("{}", "a.h", "none", "typedef NS_ENUM(NSInteger, Foo) {};\n"); + getStyle("{}", "a.h", "none", "typedef NS_ENUM(int, Foo) {};\n"); + ASSERT_TRUE((bool)Style); + EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language); + + Style = getStyle("{}", "a.h", "none", + "typedef NS_CLOSED_ENUM(int, Foo) {};\n"); ASSERT_TRUE((bool)Style); EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language); |