sentry-cocoa
sentry-cocoa copied to clipboard
Fail faster than XCTFail in tests
Description
On the flipside of #3576 , we have a lot of if let, guard let and do...try blocks that call XCTFail, but then return control to the caller and allow the test to proceed.
We should just throw an error from the spots that call XCTFail to immediately fail the test and move on. At least in the cases where do...try could be removed, or an if let or guard let check could be turned into an XCTUnwrap, no assertions after that will be valid anyways.
Lets do this opportunistically.