]> git.saurik.com Git - apple/objc4.git/blob - test/badTagIndex.m
objc4-818.2.tar.gz
[apple/objc4.git] / test / badTagIndex.m
1 /*
2 TEST_CRASHES
3 TEST_RUN_OUTPUT
4 objc\[\d+\]: tag index 264 is invalid
5 objc\[\d+\]: HALTED
6 OR
7 no tagged pointers
8 OK: badTagIndex.m
9 END
10 */
11
12 #include "test.h"
13
14 #include <objc/objc-internal.h>
15 #include <objc/NSObject.h>
16
17 #if OBJC_HAVE_TAGGED_POINTERS
18
19 int main()
20 {
21 _objc_registerTaggedPointerClass((objc_tag_index_t)(OBJC_TAG_Last52BitPayload+1), [NSObject class]);
22 fail(__FILE__);
23 }
24
25 #else
26
27 int main()
28 {
29 fprintf(stderr, "no tagged pointers\n");
30 succeed(__FILE__);
31 }
32
33 #endif