1 /* Contributed by Nicola Pero - Tue Mar 6 23:05:53 CET 2001 */
3 #include <objc/objc-api.h>
5 #include "next_mapping.h"
7 /* Tests creating a root class and a subclass with an ivar and
16 @implementation RootClass
17 #ifdef __NEXT_RUNTIME__
18 + initialize { return self; }
22 @interface SubClass : RootClass
26 - (void) setState: (int)number;
30 @implementation SubClass
31 - (void) setState: (int)number
41 #include "class-tests-1.h"
42 #define TYPE_OF_OBJECT_WITH_ACCESSOR_METHOD SubClass *
43 #include "class-tests-2.h"
49 test_class_with_superclass ("SubClass", "RootClass");
50 test_that_class_has_instance_method ("SubClass", @selector (setState:));
51 test_that_class_has_instance_method ("SubClass", @selector (state));
53 object = class_create_instance (objc_lookup_class ("SubClass"));
54 test_accessor_method (object, 0, 1, 1, -3, -3);