X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fobjc%2Fexecute%2Faccessing_ivars.m;fp=gcc%2Ftestsuite%2Fobjc%2Fexecute%2Faccessing_ivars.m;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=2c024f5ba7e6b7b087c6be2a62155dcddee3f7f3;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/objc/execute/accessing_ivars.m b/gcc/testsuite/objc/execute/accessing_ivars.m deleted file mode 100644 index 2c024f5b..00000000 --- a/gcc/testsuite/objc/execute/accessing_ivars.m +++ /dev/null @@ -1,55 +0,0 @@ -/* Contributed by Nicola Pero - Thu Mar 8 16:27:46 CET 2001 */ -#include -#include -#include - -/* Test that by using -> we can access ivars of other objects of the same - class */ - -@interface TestClass : Object -{ - int value; -} -- (int) value; -- (int) setValue: (int)number; -- (void) takeValueFrom: (TestClass *)object; -@end - -@implementation TestClass : Object -{ - int value; -} -- (int) value -{ - return value; -} -- (int) setValue: (int)number -{ - value = number; -} -- (void) takeValueFrom: (TestClass *)object -{ - value = object->value; -} -@end - -int main (void) -{ - TestClass *a; - TestClass *b; - - a = [TestClass new]; - [a setValue: 10]; - - b = [TestClass new]; - [b setValue: -10]; - - [b takeValueFrom: a]; - - if ([b value] != [a value]) - { - abort (); - } - - return 0; -}