]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/objc.dg/proto-hier-1.m
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / objc.dg / proto-hier-1.m
diff --git a/gcc/testsuite/objc.dg/proto-hier-1.m b/gcc/testsuite/objc.dg/proto-hier-1.m
deleted file mode 100644 (file)
index 17ea72e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Test for handling of protocol hierarchies.  */
-/* Author: Ziemowit Laski <zlaski@apple.com>.  */
-/* { dg-do compile } */
-
-/* One-line substitute for objc/objc.h */
-typedef struct objc_object { struct objc_class *class_pointer; } *id;
-
-@protocol NSObj 
-- (void)someMethod;
-@end
-
-@protocol NSCopying 
-- (void)someOtherMethod;
-@end
-
-@interface NSObject <NSObj>
-- (void)someMethod; 
-@end
-
-@implementation NSObject
-- (void)someMethod {}
-@end
-
-@protocol Booing <NSObj>
-- (void)boo;
-@end
-
-@interface Boo: NSObject <Booing>  // protocol has only one parent
-@end
-
-@implementation Boo
-- (void)boo {}
-@end
-
-@protocol Fooing <NSCopying, NSObj>  // Fooing has two parent protocols
-- (void)foo;
-@end
-
-@interface Foo: NSObject <Fooing>
-@end
-
-@implementation Foo
-- (void)foo {}
-- (void)someOtherMethod {}
-@end
-
-int foo(void) {
-  id<Booing, Fooing> stupidVar;
-  [stupidVar boo];
-  [stupidVar foo];
-  [stupidVar anotherMsg]; /* { dg-warning "not implemented by protocol" } */
-  /* { dg-warning "return type defaults to id" "" { target *-*-* } 51 } */
-  return 0;
-}