arr-cast.m 600 B

1234567891011121314151617181920
  1. // TEST_CONFIG
  2. #include "test.h"
  3. // objc.h redefines these calls into bridge casts.
  4. // This test verifies that the function implementations are exported.
  5. __BEGIN_DECLS
  6. extern void *retainedObject(void *arg) __asm__("_objc_retainedObject");
  7. extern void *unretainedObject(void *arg) __asm__("_objc_unretainedObject");
  8. extern void *unretainedPointer(void *arg) __asm__("_objc_unretainedPointer");
  9. __END_DECLS
  10. int main()
  11. {
  12. void *p = (void*)&main;
  13. testassert(p == retainedObject(p));
  14. testassert(p == unretainedObject(p));
  15. testassert(p == unretainedPointer(p));
  16. succeed(__FILE__);
  17. }