]> git.saurik.com Git - apple/objc4.git/blobdiff - test/imageorder2.m
objc4-437.tar.gz
[apple/objc4.git] / test / imageorder2.m
diff --git a/test/imageorder2.m b/test/imageorder2.m
new file mode 100644 (file)
index 0000000..0b443a5
--- /dev/null
@@ -0,0 +1,23 @@
+#include "test.h"
+#include "imageorder.h"
+
+static void c2(void) __attribute__((constructor));
+static void c2(void)
+{
+    testassert(state == 2);  // +load before C/C++
+    testassert(cstate == 1);
+    cstate = 2;
+}
+
+@implementation Super (cat2)
++(void) method {
+    fail("+[Super(cat2) method] not replaced!");
+}
++(void) method2 {
+    state = 2;
+}
++(void) load {
+    testassert(state == 1);
+    state = 2;
+}
+@end