Make tree-ssa-strlen.c handle partial unterminated strings
[official-gcc.git] / gcc / testsuite / objc / execute / formal_protocol-4.m
bloba416c4a0c09679730908733a430cd3433c5c3566
1 /* Contributed by Nicola Pero - Fri Mar  9 21:35:47 CET 2001 */
3 #include <stdlib.h>
4 #include "../../objc-obj-c++-shared/TestsuiteObject.m"
6 /* Test defining a protocol, a class adopting it in a category */
8 @protocol Evaluating
9 - (int) importance;
10 @end
12 @interface Feature : TestsuiteObject
13 @end
15 @implementation Feature
16 @end
18 @interface Feature (EvaluatingProtocol) <Evaluating>
19 @end
21 @implementation Feature (EvaluatingProtocol)
22 - (int) importance
24   return 1000;
26 @end
28 int main (void)
30   id <Evaluating> object;
32   object = [Feature new];
34   if ([object importance] != 1000)
35     {
36       abort ();
37     }
39   return 0;