nilAPIArgs.m 479 B

123456789101112131415161718
  1. /*
  2. TEST_BUILD_OUTPUT
  3. .*nilAPIArgs.m:\d+:\d+: warning: null passed to a callee that requires a non-null argument \[-Wnonnull\]
  4. .*nilAPIArgs.m:\d+:\d+: warning: null passed to a callee that requires a non-null argument \[-Wnonnull\]
  5. END
  6. */
  7. #include "test.h"
  8. #import <objc/runtime.h>
  9. int main() {
  10. // ensure various bits of API don't crash when tossed nil parameters
  11. class_conformsToProtocol(nil, nil);
  12. method_setImplementation(nil, NULL);
  13. succeed(__FILE__);
  14. }