Each test needs to assert some expected behavior. The use of the XCTAssert functions tells Xcode what is expected.
The most important assert functions are:
- XCTAssertTrue(_:_:file:line:): This asserts that an expression is true
- XCTAssertFalse(_:_:file:line:): This asserts that an expression is false
- XCTAssertEqual(_:_:_:file:line:): This asserts that two expressions are equal
- XCTAssertEqualWithAccuracy(_:_:accuracy:_:file:line:): This asserts that two expressions are the same, taking into account the accuracy defined in the accuracy parameter
- XCTAssertNotEqual(_:_:_:file:line:): This asserts that two expressions are not ...