]> git.saurik.com Git - apple/objc4.git/blob - test/associationForbidden3.m
objc4-787.1.tar.gz
[apple/objc4.git] / test / associationForbidden3.m
1 // TEST_CRASHES
2 /*
3 TEST_RUN_OUTPUT
4 Associated object is 0x[0-9a-fA-F]+
5 objc\[\d+\]: objc_setAssociatedObject called on instance \(0x[0-9a-fA-F]+\) of class ForbiddenSubclass which does not allow associated objects
6 objc\[\d+\]: HALTED
7 END
8 */
9
10 #include "associationForbidden.h"
11
12 @interface ForbiddenSubclass : Forbidden
13 @end
14 @implementation ForbiddenSubclass
15 @end
16
17 void test(void)
18 {
19 ShouldSucceed([Normal alloc]);
20 ShouldSucceed([ForbiddenSubclass alloc]);
21 }