1/*
2  To test -weak-l or -weak-framework:
3  * -DWEAK_IMPORT=
4  * -DWEAK_FRAMEWORK=1
5  * -UEMPTY  when building the weak-not-missing library
6  * -DEMPTY= when building the weak-missing library
7
8  To test attribute((weak_import)):
9  * -DWEAK_IMPORT=__attribute__((weak_import))
10  * -UWEAK_FRAMEWORK
11  * -UEMPTY  when building the weak-not-missing library
12  * -DEMPTY= when building the weak-missing library
13
14*/
15
16#include "test.h"
17#include <objc/runtime.h>
18
19extern int state;
20
21WEAK_IMPORT OBJC_ROOT_CLASS
22@interface MissingRoot {
23    id isa;
24}
25+(void) initialize;
26+(Class) class;
27+(id) alloc;
28-(id) init;
29-(void) dealloc;
30+(int) method;
31@end
32
33@interface MissingRoot (RR)
34-(id) retain;
35-(void) release;
36@end
37
38WEAK_IMPORT
39@interface MissingSuper : MissingRoot {
40  @public
41    int ivar;
42}
43@end
44
45OBJC_ROOT_CLASS
46@interface NotMissingRoot {
47    id isa;
48}
49+(void) initialize;
50+(Class) class;
51+(id) alloc;
52-(id) init;
53-(void) dealloc;
54+(int) method;
55@end
56
57@interface NotMissingRoot (RR)
58-(id) retain;
59-(void) release;
60@end
61
62@interface NotMissingSuper : NotMissingRoot {
63  @public
64    int unused[100];
65    int ivar;
66}
67@end
68