X-Git-Url: https://git.saurik.com/apple/objc4.git/blobdiff_plain/7c0e6487d7b67b6bf6c632300ee4b74e8950b051..7af964d1562d70f51a8e9aca24215ac3d83d0624:/test/method_getName.m diff --git a/test/method_getName.m b/test/method_getName.m new file mode 100644 index 0000000..fe6793d --- /dev/null +++ b/test/method_getName.m @@ -0,0 +1,20 @@ +#include "test.h" +#include +#include +#include "../runtime/objc-rtp.h" + +int main() { + unsigned i; + Class c = [NSObject class]; + unsigned numMethods; + Method *methods = class_copyMethodList(c, &numMethods); + + for (i=0; i method_getName crash on NSObject method when GC is enabled + SEL aMethod = method_getName(methods[i]); + if (aMethod == (SEL)kIgnore) + fail(__FILE__); + } + + succeed(__FILE__); +}