]> git.saurik.com Git - apple/objc4.git/blobdiff - test/zone.m
objc4-646.tar.gz
[apple/objc4.git] / test / zone.m
index 902330831208c2ebb665f0edda510106232c7656..46ec5ea89f2fa6f4e456d5c49a06e3b4f4939355 100644 (file)
@@ -1,3 +1,5 @@
+// TEST_CONFIG
+
 #include "test.h"
 #include <mach/mach.h>
 #include <malloc/malloc.h>
@@ -8,6 +10,11 @@
 
 int main()
 {
+    if (is_guardmalloc()) {
+        // guard malloc confuses this test
+        succeed(__FILE__);
+    }
+
     kern_return_t kr;
     vm_address_t *zones;
     unsigned int count, i;
@@ -21,7 +28,7 @@ int main()
     for (i = 0; i < count; i++) {
         const char *name = malloc_get_zone_name((malloc_zone_t *)zones[i]);
         if (name) {
-            BOOL is_objc = (0 == strcmp(name, "ObjC")) ? YES : NO;
+            BOOL is_objc = (0 == strcmp(name, "ObjC_Internal")) ? YES : NO;
             if (is_objc) has_objc = YES;
             testprintf("zone %s\n", name);
         }