]> git.saurik.com Git - apple/objc4.git/blob - test/imageorder2.m
objc4-756.2.tar.gz
[apple/objc4.git] / test / imageorder2.m
1 #include "test.h"
2 #include "imageorder.h"
3
4 static void c2(void) __attribute__((constructor));
5 static void c2(void)
6 {
7 testassert(state == 2); // +load before C/C++
8 testassert(cstate == 1);
9 cstate = 2;
10 }
11
12
13 #if __clang__
14 #pragma clang diagnostic push
15 #pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
16 #endif
17
18 @implementation Super (cat2)
19 +(void) method {
20 fail("+[Super(cat2) method] not replaced!");
21 }
22 +(void) method2 {
23 state = 2;
24 }
25 +(void) load {
26 testassert(state == 1);
27 state = 2;
28 }
29 @end
30
31 #if __clang__
32 #pragma clang diagnostic pop
33 #endif