Skip to content

Instantly share code, notes, and snippets.

@iggym
Created December 12, 2013 22:06
Show Gist options
  • Select an option

  • Save iggym/7936425 to your computer and use it in GitHub Desktop.

Select an option

Save iggym/7936425 to your computer and use it in GitHub Desktop.
XCTest Assertions
//XCTest supports the following assertions.
XCTFail (format…)
XCTAssertNil (a1, format…)
XCTAssertNotNil (a1, format…)
XCTAssert (a1, format…)
XCTAssertTrue (a1, format…)
XCTAssertFalse (a1, format…)
XCTAssertEqualObjects (a1, a2, format…)
XCTAssertEquals (a1, a2, format…)
XCTAssertEqualsWithAccuracy (a1, a2, accuracy, format…)
XCTAssertThrows (expression, format…)
XCTAssertThrowsSpecific (expression, specificException, format…)
XCTAssertThrowsSpecificNamed (expression, specificException, exceptionName, format…)
XCTAssertNoThrow (expression, format…)
XCTAssertNoThrowSpecific (expression, specificException, format…)
XCTAssertNoThrowSpecificNamed (expression, specificExcepton, exceptionName, format…)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment