Skip to content

Commit

Permalink
Merge pull request #121 from CodaFi/action-replay
Browse files Browse the repository at this point in the history
Show Replay Tokens in XCTAssert
  • Loading branch information
CodaFi committed Nov 19, 2015
2 parents 49e8195 + 8de263e commit f85a7b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SwiftCheck/TestOperators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ infix operator <- {}
/// Binds a Testable value to a property.
public func <-(checker : AssertiveQuickCheck, @autoclosure(escaping) test : () -> Testable) {
switch quickCheckWithResult(checker.args, p: test()) {
case let .Failure(_, _, _, _, reason, _, _):
XCTFail(reason, file: checker.file, line: checker.line)
case let .Failure(_, sz, seed, _, reason, _, _):
XCTFail(reason + "; Replay with \(seed) and size \(sz)", file: checker.file, line: checker.line)
case .NoExpectedFailure(_, _, _):
XCTFail("Expected property to fail but it didn't.", file: checker.file, line: checker.line)
default:
Expand All @@ -23,8 +23,8 @@ public func <-(checker : AssertiveQuickCheck, @autoclosure(escaping) test : () -
/// Binds a Testable value to a property.
public func <-(checker : AssertiveQuickCheck, test : () -> Testable) {
switch quickCheckWithResult(checker.args, p: test()) {
case let .Failure(_, _, _, _, reason, _, _):
XCTFail(reason, file: checker.file, line: checker.line)
case let .Failure(_, sz, seed, _, reason, _, _):
XCTFail(reason + "; Replay with \(seed) and size \(sz)", file: checker.file, line: checker.line)
case .NoExpectedFailure(_, _, _):
XCTFail("Expected property to fail but it didn't.", file: checker.file, line: checker.line)
default:
Expand Down

0 comments on commit f85a7b9

Please sign in to comment.