]> git.saurik.com Git - apple/objc4.git/blob - test/sel.m
objc4-779.1.tar.gz
[apple/objc4.git] / test / sel.m
1 /*
2 TEST_BUILD_OUTPUT
3 .*sel.m:\d+:\d+: warning: null passed to a callee that requires a non-null argument \[-Wnonnull\](\n.* note: expanded from macro 'testassert')?
4 END
5 */
6
7 #include "test.h"
8 #include <string.h>
9 #include <objc/objc-runtime.h>
10 #include <objc/objc-auto.h>
11
12 int main()
13 {
14 // Make sure @selector values are correctly fixed up
15 testassert(@selector(foo) == sel_registerName("foo"));
16
17 // sel_getName recognizes the zero SEL
18 testassert(0 == strcmp("<null selector>", sel_getName(0)));
19
20 succeed(__FILE__);
21 }