1 /* Test custom exception matchers */
2 /* Author: Nicola Pero */
4 #ifdef __NEXT_RUNTIME__
5 /* This test only runs for the GNU runtime. TODO: It should work on
6 the NEXT runtime as well (needs testing).
16 #include <objc/objc-api.h>
17 #include <objc/objc-exception.h>
18 #include <objc/Object.h>
21 static unsigned int handlerExpected = 0;
24 my_exception_matcher(Class match_class, id exception)
43 main(int argc, char *argv[])
45 objc_setExceptionMatcher (my_exception_matcher);
53 /* Since we installed an exception matcher that always matches,
54 the exception should be sent here even if it's of class A and
55 this is looking for exceptions of class B.