]> git.saurik.com Git - apple/objc4.git/blob - test/method_getName.m
fe6793d7c10b7f87bdf58ac0ad6f253058c11f76
[apple/objc4.git] / test / method_getName.m
1 #include "test.h"
2 #include <Foundation/NSObject.h>
3 #include <objc/runtime.h>
4 #include "../runtime/objc-rtp.h"
5
6 int main() {
7 unsigned i;
8 Class c = [NSObject class];
9 unsigned numMethods;
10 Method *methods = class_copyMethodList(c, &numMethods);
11
12 for (i=0; i<numMethods; ++i) {
13 // <rdar://problem/6190950> method_getName crash on NSObject method when GC is enabled
14 SEL aMethod = method_getName(methods[i]);
15 if (aMethod == (SEL)kIgnore)
16 fail(__FILE__);
17 }
18
19 succeed(__FILE__);
20 }