gcc/testsuite/objc/execute/class-2.m
raw| 1 | /* Contributed by Nicola Pero - Tue Mar 6 23:05:53 CET 2001 */ |
| 2 | |
| 3 | #include <objc/objc.h> |
| 4 | |
| 5 | /* Tests creating a root class and a subclass */ |
| 6 | |
| 7 | @interface RootClass |
| 8 | { |
| 9 | Class isa; |
| 10 | } |
| 11 | @end |
| 12 | |
| 13 | @implementation RootClass |
| 14 | @end |
| 15 | |
| 16 | @interface SubClass : RootClass |
| 17 | @end |
| 18 | |
| 19 | @implementation SubClass |
| 20 | @end |
| 21 | |
| 22 | #include "class-tests-1.h" |
| 23 | |
| 24 | int main (void) |
| 25 | { |
| 26 | test_class_with_superclass ("SubClass", "RootClass"); |
| 27 | |
| 28 | return 0; |
| 29 | } |