Skip to content

Commit

Permalink
Update documentation on "equal" predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavan Chan committed May 5, 2017
1 parent b369214 commit d088ce6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1251,11 +1251,11 @@ value and return a `Predicate` closure. Take `equal`, for example:
```swift
// Swift

public func equal<T: Equatable>(expectedValue: T?) -> MatcherFunc<T?> {
// Can be shorted to:
public func equal<T: Equatable>(expectedValue: T?) -> Predicate<T> {
// Can be shortened to:
// Predicate { actual in ... }
//
// But shown with types here for clarity
// But shown with types here for clarity.
return Predicate { (actual: Expression<T>) throws -> PredicateResult in
let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>")
if let actualValue = try actualExpression.evaluate() {
Expand Down

0 comments on commit d088ce6

Please sign in to comment.