sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Fail faster than XCTFail in tests

Open armcknight opened this issue 1 year ago • 1 comments

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.

armcknight avatar Jun 29 '24 00:06 armcknight

Lets do this opportunistically.

brustolin avatar Jul 10 '24 12:07 brustolin