-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on invalid pointer reference instead of Objective-C exception handling #85
Comments
Hmmm... sounds like a reasonable conclusion. I'll try and take a look shortly - thanks for raising this (pun intended). |
I've added support for catching Objective-C exceptions. |
Wait...the raise pun or the try pun? Anyway, it looks like it works; is the '0 test cases failed' output intentional (the assertion didn't fail because the test vomited before it got there)? $ obj/classy-tests [Running: Main/basic] [Finished: 'Main/basic' 1 test case failed (1 assertion failed)] [Testing completed. 1 test case failed (1 assertion failed)] |
As for the other issue. Yeah, I noticed that too as I was looking at your first issue. However I didn't think it was related (suspected it was to do with some other changes I made recently - a suspicion that proved correct) - so I didn't let that stop me from checking in. I've now sorted the test count issue. It wasn't that the exception was preventing it from counting the failure - just that it was reporting them just before it has updated the totals. Latest version checked in should fix that. I'm closing this issue now as your original issue is resolved |
I'm not really sure how to debug this (my C++ is not that strong), but it looks like the exception should be caught at the same level it's thrown:
The exception is actually an Objective-C exception, which I can see if I take the code in my test out of a TEST_CASE and put it in main():
So it'd be great to catch Objective-C exceptions (which it looks like CATCH's C++ is capable of doing, at least on the new runtime where they use the same machinery), but then to describe them and mark the test as failed instead of dying :-)
The text was updated successfully, but these errors were encountered: