Skip to content

Commit

Permalink
Fixes accuracy causing tests to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
s4cha committed Apr 20, 2020
1 parent eb9a22a commit be8aaca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/SteviaTests/PositionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class PositionTests: XCTestCase {
v.right(10%)
ctrler.view.layoutIfNeeded()
XCTAssertEqual(v.frame.origin.y, 0 , accuracy: CGFloat(0.1))
XCTAssertEqual(v.frame.origin.x, ctrler.view.frame.width * (90/100) - v.frame.width, accuracy: CGFloat(0.1))
XCTAssertEqual(v.frame.origin.x, ctrler.view.frame.width * (90/100) - v.frame.width, accuracy: CGFloat(0.2))
XCTAssertEqual(v.frame.width, 100, accuracy: CGFloat(Float.ulpOfOne))
XCTAssertEqual(v.frame.height, 100, accuracy: CGFloat(Float.ulpOfOne))
}
Expand All @@ -249,7 +249,7 @@ class PositionTests: XCTestCase {
v.trailing(10%)
ctrler.view.layoutIfNeeded()
XCTAssertEqual(v.frame.origin.y, 0 , accuracy: CGFloat(0.1))
XCTAssertEqual(v.frame.origin.x, ctrler.view.frame.width * (90/100) - v.frame.width, accuracy: CGFloat(0.1))
XCTAssertEqual(v.frame.origin.x, ctrler.view.frame.width * (90/100) - v.frame.width, accuracy: CGFloat(0.2))
XCTAssertEqual(v.frame.width, 100, accuracy: CGFloat(Float.ulpOfOne))
XCTAssertEqual(v.frame.height, 100, accuracy: CGFloat(Float.ulpOfOne))
}
Expand All @@ -259,7 +259,7 @@ class PositionTests: XCTestCase {
v.leading(10%)
ctrler.view.layoutIfNeeded()
XCTAssertEqual(v.frame.origin.y, 0 , accuracy: CGFloat(0.1))
XCTAssertEqual(v.frame.origin.x, ctrler.view.frame.width * (90/100) - v.frame.width, accuracy: CGFloat(0.1))
XCTAssertEqual(v.frame.origin.x, ctrler.view.frame.width * (90/100) - v.frame.width, accuracy: CGFloat(0.2))
XCTAssertEqual(v.frame.width, 100, accuracy: CGFloat(Float.ulpOfOne))
XCTAssertEqual(v.frame.height, 100, accuracy: CGFloat(Float.ulpOfOne))
}
Expand Down

0 comments on commit be8aaca

Please sign in to comment.