Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.81k stars 601 forks source link

When running on non-Apple platforms, report test failures using `XCTestCase.recordFailure()` #1146

Open younata opened 5 months ago

younata commented 5 months ago

Currently, if you're running Nimble on non-Apple platforms, we report test failures using XCTFail. Which works, but is a subpar experience.

Let's instead use what Quick uses to report errors and use XCTestCase.recordFailure().

younata commented 5 months ago

After I looked in to this for about a minute, I remembered why Nimble uses XCTFail on non-apple platforms: There isn't an API to grab the current test case, and there isn't an obviously good place for Nimble to register its testcasetracker like there is in Objective-C environments.

Filed https://github.com/apple/swift-corelibs-xctest/issues/491.