nsprotocol.m 390 B

1234567891011121314151617
  1. // TEST_CONFIG
  2. #include "test.h"
  3. #include <objc/Protocol.h>
  4. int main()
  5. {
  6. // Class Protocol is always a subclass of NSObject
  7. testassert(objc_getClass("NSObject"));
  8. Class cls = objc_getClass("Protocol");
  9. testassert(class_getInstanceMethod(cls, sel_registerName("isProxy")));
  10. testassert(class_getSuperclass(cls) == objc_getClass("NSObject"));
  11. succeed(__FILE__);
  12. }