]> git.saurik.com Git - apple/objc4.git/blobdiff - test/imageorder3.m
objc4-437.tar.gz
[apple/objc4.git] / test / imageorder3.m
diff --git a/test/imageorder3.m b/test/imageorder3.m
new file mode 100644 (file)
index 0000000..15d9591
--- /dev/null
@@ -0,0 +1,23 @@
+#include "test.h"
+#include "imageorder.h"
+
+static void c3(void) __attribute__((constructor));
+static void c3(void)
+{
+    testassert(state == 3);  // +load before C/C++
+    testassert(cstate == 2);
+    cstate = 3;
+}
+
+@implementation Super (cat3)
++(void) method {
+    state = 3;
+}
++(void) method3 {
+    state = 3;
+}
++(void) load {
+    testassert(state == 2);
+    state = 3;
+}
+@end