1 // TEST_CFLAGS -framework Foundation
11 // NOTE: This test won't catch problems when running against a root, so it's of
12 // limited utility, but it would at least catch things when testing against the
15 #include <Foundation/Foundation.h>
16 #include <objc/runtime.h>
18 @interface NSBlock: NSObject @end
20 // NSBlock is a conveniently accessible superclass that (currently) has a constant cache.
21 @interface MyBlock: NSBlock
25 @implementation MyBlock
38 Method m1 = class_getClassMethod([MyBlock class], @selector(foo));
39 Method m2 = class_getClassMethod([MyBlock class], @selector(bar));
40 method_exchangeImplementations(m1, m2);