]> git.saurik.com Git - apple/objc4.git/blob - test/method_getName.m
objc4-680.tar.gz
[apple/objc4.git] / test / method_getName.m
1 // TEST_CONFIG
2
3 #include "test.h"
4 #include <Foundation/NSObject.h>
5 #include <objc/runtime.h>
6
7 #undef SUPPORT_NONPOINTER_ISA // remove test.h's definition
8 #include "../runtime/objc-config.h"
9
10 int main() {
11 unsigned i;
12 Class c = [NSObject class];
13 unsigned numMethods;
14 Method *methods = class_copyMethodList(c, &numMethods);
15
16 for (i=0; i<numMethods; ++i) {
17 // <rdar://problem/6190950> method_getName crash on NSObject method when GC is enabled
18 SEL aMethod;
19 aMethod = method_getName(methods[i]);
20 #if defined(kIgnore)
21 if (aMethod == (SEL)kIgnore)
22 fail(__FILE__);
23 #endif
24 }
25
26 succeed(__FILE__);
27 }