]> git.saurik.com Git - apple/objc4.git/blobdiff - test/methodListSmallMutableMemory.mm
objc4-787.1.tar.gz
[apple/objc4.git] / test / methodListSmallMutableMemory.mm
diff --git a/test/methodListSmallMutableMemory.mm b/test/methodListSmallMutableMemory.mm
new file mode 100644 (file)
index 0000000..9250fea
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+TEST_CFLAGS -std=c++11
+TEST_CRASHES
+TEST_RUN_OUTPUT
+objc\[\d+\]: CLASS: class 'Foo' 0x[0-9a-fA-F]+ small method list 0x[0-9a-fA-F]+ is not in immutable memory
+objc\[\d+\]: HALTED
+END
+*/
+
+#define MUTABLE_METHOD_LIST 1
+
+#include "methodListSmall.h"
+
+int main() {
+    Class fooClass = (__bridge Class)&FooClass;
+    [fooClass new];
+    fail("Should have crashed");
+}