duplicatedClasses.m 756 B

1234567891011121314151617181920212223242526
  1. // fixme rdar://24624435 duplicate class warning fails with the shared cache
  2. // OBJC_DISABLE_PREOPTIMIZATION=YES works around that problem.
  3. // TEST_ENV OBJC_DEBUG_DUPLICATE_CLASSES=YES OBJC_DISABLE_PREOPTIMIZATION=YES
  4. // TEST_CRASHES
  5. /*
  6. TEST_RUN_OUTPUT
  7. objc\[\d+\]: Class [^\s]+ is implemented in both .+ \(0x[0-9a-f]+\) and .+ \(0x[0-9a-f]+\)\. One of the two will be used\. Which one is undefined\.
  8. objc\[\d+\]: HALTED
  9. OR
  10. OK: duplicatedClasses.m
  11. END
  12. */
  13. #include "test.h"
  14. #include "testroot.i"
  15. @interface WKWebView : TestRoot @end
  16. @implementation WKWebView @end
  17. int main()
  18. {
  19. void *dl = dlopen("/System/Library/Frameworks/WebKit.framework/WebKit", RTLD_LAZY);
  20. if (!dl) fail("couldn't open WebKit");
  21. fail("should have crashed already");
  22. }