[llvm-commits] [test-suite] r126968 - in /test-suite/trunk/SingleSource/UnitTests/ObjC: exceptions-4.m exceptions-4.reference_output
Bill Wendling
isanbard at gmail.com
Thu Mar 3 15:10:56 PST 2011
Author: void
Date: Thu Mar 3 17:10:56 2011
New Revision: 126968
URL: http://llvm.org/viewvc/llvm-project?rev=126968&view=rev
Log:
Testcase for <rdar://problem/8824861>.
Added:
test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.m
test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.reference_output
Added: test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.m
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.m?rev=126968&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.m (added)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.m Thu Mar 3 17:10:56 2011
@@ -0,0 +1,22 @@
+#import <Foundation/Foundation.h>
+
+int main (int argc, const char * argv[]) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSMutableArray *array =
+ [NSMutableArray arrayWithObjects:@"One", @"Two", @"Three", nil];
+
+ BOOL enumerated = NO;
+ BOOL exceptionThrown = NO;
+ @try {
+ for (id obj in array) {
+ enumerated = YES;
+ [array removeLastObject];
+ }
+ } @catch (NSException *e) {
+ exceptionThrown = YES
+ }
+
+ assert(enumerated == YES && exceptionThrown == YES);
+ [pool drain];
+ return 0;
+}
Added: test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.reference_output?rev=126968&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.reference_output (added)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/exceptions-4.reference_output Thu Mar 3 17:10:56 2011
@@ -0,0 +1 @@
+exit 0
More information about the llvm-commits
mailing list