mercredi 5 août 2015

XCTAssert break function

How to stop unit test execution if a logic is failed. Below is the example. How to stop execution when XCTAssertEqual("Hello", "Hi", "Passed") condition is failed.

func test_one() 
{    
XCTAssertEqual("Hello", "Hi", "Passed")    
let b = "Good Morning!" 
// code continues...

}

Aucun commentaire:

Enregistrer un commentaire