Skip to content

Instantly share code, notes, and snippets.

@yannxou
Created August 10, 2018 09:25
Show Gist options
  • Select an option

  • Save yannxou/416d52dd4eba25d71c963e7eb74782a1 to your computer and use it in GitHub Desktop.

Select an option

Save yannxou/416d52dd4eba25d71c963e7eb74782a1 to your computer and use it in GitHub Desktop.
Custom assertions
// Xcode will notify in the appropiate line when the custom assertion function fails
func assertSomething(with param: InterestingObject, file: StaticString = #file, line: UInt = #line) {
XCTFail("Bad bad", file: file, line: line)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment