5 #include <objc/objc-runtime.h>
7 @interface Sub : TestRoot @end
8 @implementation Sub @end
12 // [super ...] messages are tested in msgSend.m
14 testassert(class_getSuperclass([Sub class]) == [TestRoot class]);
15 testassert(class_getSuperclass(object_getClass([Sub class])) == object_getClass([TestRoot class]));
16 testassert(class_getSuperclass([TestRoot class]) == Nil);
17 testassert(class_getSuperclass(object_getClass([TestRoot class])) == [TestRoot class]);
18 testassert(class_getSuperclass(Nil) == Nil);