Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / execute / formal_protocol-7.m
blobc4e18500f50c8ca7c8cd93c84c1224956a7469ab
1 /* Contributed by Nicola Pero - Fri Mar  9 21:35:47 CET 2001 */
3 #include <stdlib.h>
4 #import "../../objc-obj-c++-shared/Protocol1.h"
6 /* Test defining two protocols, one incorporating the other one. */
8 @protocol Configuring
9 - (void) configure;
10 @end
12 @protocol Processing <Configuring>
13 - (void) process;
14 @end
16 /* A class adopting the protocol */
17 @interface Test : Object <Processing>
19   BOOL didConfigure;
20   BOOL didProcess;
22 @end
24 @implementation Test
25 - (void) configure
27   didConfigure = YES;
29 - (void) process
31   didProcess = YES;
33 @end
35 int main (void)
37   id <Processing> object = [Test new];
39   [object configure];
40   [object process];
42   return 0;