]> git.saurik.com Git - apple/objc4.git/blob - test/associationForbidden4.m
objc4-818.2.tar.gz
[apple/objc4.git] / test / associationForbidden4.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 ForbiddenDuplicate which does not allow associated objects
6 objc\[\d+\]: HALTED
7 END
8 */
9
10 #include "associationForbidden.h"
11
12 void test(void)
13 {
14 ShouldSucceed([Normal alloc]);
15 Class ForbiddenDuplicate = objc_duplicateClass([Forbidden class],
16 "ForbiddenDuplicate", 0);
17 ShouldFail([ForbiddenDuplicate alloc]);
18 }