aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-09 08:36:49 +0000
committerDaniel Jasper <djasper@google.com>2013-01-09 08:36:49 +0000
commit886568dc24eb0a1ccf73bf32d1eafa8fd4008cc6 (patch)
tree7707b332270a9fb01ea6c2602c9fc11f385928c2 /unittests/Format/FormatTest.cpp
parent9c837d05c9e6d6971900d36b1e462ed3666b7487 (diff)
Fix ObjC block declarations.
Before: int ( ^ Block1) (int, int) = ^ (int i, int j) After: int (^Block1) (int, int) = ^(int i, int j) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 9bf3097a5c..2e6424dd00 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1122,6 +1122,11 @@ TEST_F(FormatTest, FormatForObjectiveCMethodDecls) {
"outRange8:(NSRange) out_range8 outRange9:(NSRange) out_range9;"));
}
+TEST_F(FormatTest, FormatObjCBlocks) {
+ verifyFormat("int (^Block) (int, int);");
+ verifyFormat("int (^Block1) (int, int) = ^(int i, int j)");
+}
+
TEST_F(FormatTest, ObjCAt) {
verifyFormat("@autoreleasepool");
verifyFormat("@catch");