1 /* Contributed by Nicola Pero - Tue Mar 6 23:05:53 CET 2001 */
5 /* Tests creating a root class and a subclass with a class methods */
13 @implementation RootClass
14 + initialize { return self; }
17 static int class_variable = 0;
19 @interface SubClass : RootClass
20 + (void) setState: (int)number;
24 @implementation SubClass
25 + (void) setState: (int)number
27 class_variable = number;
31 return class_variable;
35 #include "class-tests-1.h"
36 #define TYPE_OF_OBJECT_WITH_ACCESSOR_METHOD Class
37 #include "class-tests-2.h"
43 test_class_with_superclass ("SubClass", "RootClass");
44 test_that_class_has_class_method ("SubClass", @selector (setState:));
45 test_that_class_has_class_method ("SubClass", @selector (state));
47 class = objc_getClass ("SubClass");
48 test_accessor_method (class, 0, -1, -1, 1, 1);