FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / objc / execute / _cmd.m
blob20203b51711195aa865969c225deb472a4124237
1 /* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2 #include <objc/objc.h>
3 #include <objc/objc-api.h>
5 /* Test the hidden argument _cmd to method calls */
7 @interface TestClass 
9   Class isa;
11 + (const char*) method;
12 @end
14 @implementation TestClass
15 + (const char*) method;
17   return sel_get_name (_cmd);
19 @end
22 int main (void)
24   if (strcmp ([TestClass method], "method"))
25     {
26       abort ();
27     }
29   return 0;