X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fobjc%2Fexecute%2Fformal_protocol-3.m;fp=gcc%2Ftestsuite%2Fobjc%2Fexecute%2Fformal_protocol-3.m;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=9fc2a768ded1738b512094bbfab9f99f81bde154;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/objc/execute/formal_protocol-3.m b/gcc/testsuite/objc/execute/formal_protocol-3.m deleted file mode 100644 index 9fc2a768..00000000 --- a/gcc/testsuite/objc/execute/formal_protocol-3.m +++ /dev/null @@ -1,58 +0,0 @@ -/* Contributed by Nicola Pero - Fri Mar 9 21:35:47 CET 2001 */ -#include -#include - -/* Test defining two protocol, a class adopting both of them, - and using an object of type `id ' */ - -@protocol Enabling -- (BOOL) isEnabled; -- (void) setEnabled: (BOOL)flag; -@end - -@protocol Evaluating -- (int) importance; -@end - -@interface Feature : Object -{ - const char *name; - BOOL isEnabled; -} -@end - -@implementation Feature -- (BOOL) isEnabled -{ - return isEnabled; -} -- (void) setEnabled: (BOOL)flag -{ - isEnabled = flag; -} -- (int) importance -{ - return 1000; -} -@end - -int main (void) -{ - id object; - - object = [Feature new]; - - [object setEnabled: YES]; - if (![object isEnabled]) - { - abort (); - } - - if ([object importance] != 1000) - { - abort (); - } - - return 0; -} -