summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc/execute/selector-1.m
blob: 531e02babcf8388eaa4fa7ea9e59a784902eba4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Contributed by Nicola Pero - Thu Mar  8 16:27:46 CET 2001 */
#include <objc/objc.h>
#include <objc/objc-api.h>
#include <objc/Object.h>

int main (void)
{
  SEL selector;
  char *selname;

  selector = @selector (alloc);
#ifdef __NEXT_RUNTIME__
  selname = sel_getName (selector);
#else
  selname = sel_get_name (selector);
#endif
  if (strcmp (selname, "alloc"))
    abort ();

  return 0;
}