Objc Equivalent to STFail, but Test Termination

I am looking for the equivalent of STAssertTrue, STAssertFail ...

but they can stop the test when it fails (for example, in Java).

Do they have something similar in objc?

+4
source share
1 answer

You can use the raiseAfterFailure method of the raiseAfterFailure method . For example, in the following test method, β€œEPIC FAIL” will never happen.

 - (void)testFailing { [self raiseAfterFailure]; STFail(@"FAIL"); STFail(@"EPIC FAIL!"); } 
+4
source

All Articles