Skip to content

Commit

Permalink
fix assertions for floats by using XCTAssertEqualWithAccuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Chmelar committed Nov 12, 2015
1 parent ab52f03 commit 41d5c22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/UIKit/UIViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UIViewTests: XCTestCase {
_view = view

view.rex_alpha <~ SignalProducer(value: 0.5)
XCTAssert(_view?.alpha == 0.5)
XCTAssertEqualWithAccuracy(_view!.alpha, 0.5, accuracy: 0.01)
}

func testHiddenPropertyDoesntCreateRetainCycle() {
Expand Down Expand Up @@ -59,8 +59,8 @@ class UIViewTests: XCTestCase {
view.rex_alpha <~ SignalProducer(signal: pipeSignal)

observer.sendNext(firstChange)
XCTAssertEqual(view.alpha, firstChange)
XCTAssertEqualWithAccuracy(view.alpha, firstChange, accuracy: 0.01)
observer.sendNext(secondChange)
XCTAssertEqual(view.alpha, secondChange)
XCTAssertEqualWithAccuracy(view.alpha, secondChange, accuracy: 0.01)
}
}

0 comments on commit 41d5c22

Please sign in to comment.