1 // TEST_CFLAGS -Wno-deprecated-declarations
14 #include <objc/objc-gdb.h>
15 #include <objc/runtime.h>
17 @interface Super { @public id isa; } @end
20 +class { return self; }
31 // Class should not be realized yet
32 // fixme not true during class hash rearrangement
33 // result = NXMapGet(gdb_objc_realized_classes, "Super");
34 // testassert(!result);
37 // Now class should be realized
39 result = (Class)NXMapGet(gdb_objc_realized_classes, "Super");
41 testassert(result == [Super class]);
43 result = (Class)NXMapGet(gdb_objc_realized_classes, "DoesNotExist");
48 struct objc_class query;
52 result = (Class)NXHashGet(_objc_debug_class_hash, &query);
54 testassert((id)result == [Super class]);
56 query.name = "DoesNotExist";
57 result = (Class)NXHashGet(_objc_debug_class_hash, &query);