]> git.saurik.com Git - apple/objc4.git/blob - test/method_getName.m
objc4-551.1.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 #include "../runtime/objc-config.h"
7
8 int main() {
9 unsigned i;
10 Class c = [NSObject class];
11 unsigned numMethods;
12 Method *methods = class_copyMethodList(c, &numMethods);
13
14 for (i=0; i<numMethods; ++i) {
15 // <rdar://problem/6190950> method_getName crash on NSObject method when GC is enabled
16 SEL aMethod;
17 aMethod = method_getName(methods[i]);
18 #if defined(kIgnore)
19 if (aMethod == (SEL)kIgnore)
20 fail(__FILE__);
21 #endif
22 }
23
24 succeed(__FILE__);
25 }