]> git.saurik.com Git - apple/objc4.git/blob - test/duplicatedClasses.m
objc4-680.tar.gz
[apple/objc4.git] / test / duplicatedClasses.m
1 // TEST_ENV OBJC_DEBUG_DUPLICATE_CLASSES=YES
2 // TEST_CRASHES
3 /*
4 TEST_RUN_OUTPUT
5 objc\[\d+\]: Class GKScore is implemented in both [^\s]+ and [^\s]+ One of the two will be used. Which one is undefined.
6 CRASHED: SIG(ILL|TRAP)
7 OR
8 OK: duplicatedClasses.m
9 END
10 */
11
12 #include "test.h"
13 #include "testroot.i"
14
15 @interface GKScore : TestRoot @end
16 @implementation GKScore @end
17
18 int main()
19 {
20 if (objc_collectingEnabled()) {
21 testwarn("rdar://19042235 test disabled because GameKit is not GC");
22 succeed(__FILE__);
23 }
24 void *dl = dlopen("/System/Library/Frameworks/GameKit.framework/GameKit", RTLD_LAZY);
25 if (!dl) fail("couldn't open GameKit");
26 fail("should have crashed already");
27 }