1 // TEST_CFLAGS -Wno-deprecated-declarations
17 #include <objc/Protocol.h>
19 char Protocol_name[] __attribute__((section("__OBJC,__class_names"))) = "Protocol";
23 const char *protocol_name;
25 void *instance_methods;
29 struct st Foo_protocol __attribute__((section("__OBJC,__protocol"))) = { Protocol_name, "Foo", 0, 0, 0 };
33 Protocol *foo = objc_getProtocol("Foo");
35 testassert(foo == (Protocol *)&Foo_protocol);
36 testassert(0 == strcmp("Foo", [foo name]));