]> git.saurik.com Git - apple/objc4.git/blob - test/imageorder1.m
objc4-493.9.tar.gz
[apple/objc4.git] / test / imageorder1.m
1 #include "test.h"
2 #include "imageorder.h"
3
4 int state = -1;
5 int cstate = 0;
6
7 static void c1(void) __attribute__((constructor));
8 static void c1(void)
9 {
10 testassert(state == 1); // +load before C/C++
11 testassert(cstate == 0);
12 cstate = 1;
13 }
14
15 @implementation Super (cat1)
16 +(void) method {
17 fail("+[Super(cat1) method] not replaced!");
18 }
19 +(void) method1 {
20 state = 1;
21 }
22 +(void) load {
23 testassert(state == 0);
24 state = 1;
25 }
26 @end
27
28 @implementation Super
29 +(void) initialize { }
30 +(void) method {
31 fail("+[Super method] not replaced!");
32 }
33 +(void) method0 {
34 state = 0;
35 }
36 +(void) load {
37 testassert(state == -1);
38 state = 0;
39 }
40 @end
41