Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / objc / execute / encode-1.m
blob3e2412e4647ee5b6bb50d189739f9eabc810d9d5
1 /* Contributed by Nicola Pero - Thu Mar  8 16:27:46 CET 2001 */
2 #include <stdlib.h>
3 #import "../../objc-obj-c++-shared/Object1.h"
4 #include <objc/objc.h>
5 #include <objc/objc-api.h>
7 /* Test very simple @encode */
9 int main (void)
11   if (strcmp ("i", @encode (int)))
12     {
13       abort ();
14     }
16   if (strcmp ("@", @encode (id)))
17     {
18       abort ();
19     }
21   if (strcmp ("@", @encode (Object *)))
22     {
23       abort ();
24     }
26   if (strcmp (":", @encode (SEL)))
27     {
28       abort ();
29     }
31   return 0;