diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/objc/execute/class-3.m')
-rw-r--r-- | gcc-4.9/gcc/testsuite/objc/execute/class-3.m | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/objc/execute/class-3.m b/gcc-4.9/gcc/testsuite/objc/execute/class-3.m new file mode 100644 index 000000000..071708a6e --- /dev/null +++ b/gcc-4.9/gcc/testsuite/objc/execute/class-3.m @@ -0,0 +1,43 @@ +/* Contributed by Nicola Pero - Tue Mar 6 23:05:53 CET 2001 */ + +#include <objc/objc.h> + +/* Tests creating a root class and a minimal subclass tree */ + +@interface RootClass +{ + Class isa; +} +@end + +@implementation RootClass +@end + +@interface SubClassA : RootClass +@end + +@implementation SubClassA +@end + +@interface SubClassB : RootClass +@end + +@implementation SubClassB +@end + +@interface SubSubClass : SubClassA +@end + +@implementation SubSubClass +@end + +#include "class-tests-1.h" + +int main (void) +{ + test_class_with_superclass ("SubClassA", "RootClass"); + test_class_with_superclass ("SubClassB", "RootClass"); + test_class_with_superclass ("SubSubClass", "SubClassA"); + + return 0; +} |