Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / execute / enumeration-1.m
blob1adcfd02e956e022c01eb8054343a33350b22a37
1 /* Contributed by Nicola Pero -  Wed Dec  5 17:12:40 GMT 2001 */
2 #include <stdlib.h>
3 #import "../../objc-obj-c++-shared/Object1.h"
4 #include <objc/objc.h>
6 /* Test using a bitfield enumeration ivar.  */
8 typedef enum
10   black,
11   white
12 } color;
14 @interface TestClass: Object
16   color c:2;
18 - (color)color;
19 - (void)setColor: (color)a;
20 @end
22 @implementation TestClass
23 - (color)color
25   return c;
27 - (void)setColor: (color)a
29   c = a;
31 @end
34 int main (void)
36   TestClass *c;
37   
38   c = [TestClass new];
39   
40   [c setColor: black];
41   [c setColor: white];
42   [c setColor: black];
43   if ([c color] != black)
44     {
45       abort ();
46     }
47   
49   return 0;