Skip to content

Commit

Permalink
Merge pull request #522 from Quick/bevoid-operator-static-func
Browse files Browse the repository at this point in the history
[gardening][BeVoid] Move operators into types
  • Loading branch information
wongzigii authored Apr 25, 2018
2 parents 37dc443 + d415310 commit 7e7dda6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Sources/Nimble/Matchers/BeVoid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ public func beVoid() -> Predicate<()> {
}
}

public func == (lhs: Expectation<()>, rhs: ()) {
lhs.to(beVoid())
}
extension Expectation where T == () {
public static func == (lhs: Expectation<()>, rhs: ()) {
lhs.to(beVoid())
}

public func != (lhs: Expectation<()>, rhs: ()) {
lhs.toNot(beVoid())
public static func != (lhs: Expectation<()>, rhs: ()) {
lhs.toNot(beVoid())
}
}

0 comments on commit 7e7dda6

Please sign in to comment.