diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 8d72df2754..4e44f5e650 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -2540,8 +2540,13 @@ TEST_F(FormatTest, ObjCLiterals) { verifyFormat("NSNumber *favoriteColor = @(Green);"); verifyFormat("NSString *path = @(getenv(\"PATH\"));"); - // FIXME: Array and dictionary literals need more work. verifyFormat("@["); + verifyFormat("@[]"); + verifyFormat( + "NSArray *array = @[ @\" Hey \", NSApp, [NSNumber numberWithInt:42] ];"); + verifyFormat("return @[ @3, @[], @[ @4, @5 ] ];"); + + // FIXME: Array and dictionary literals need more work. verifyFormat("@{"); } |