diff --git a/Package.swift b/Package.swift index d83cee07..3354110d 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.3 import PackageDescription diff --git a/Tests/SteviaTests/BaselineTests.swift b/Tests/SteviaTests/BaselineTests.swift index 282a29ee..1213b921 100644 --- a/Tests/SteviaTests/BaselineTests.swift +++ b/Tests/SteviaTests/BaselineTests.swift @@ -16,8 +16,6 @@ class BaselineTests: XCTestCase { var label1 = UILabel() var label2 = UILabel() - - override func setUp() { win = UIWindow(frame: UIScreen.main.bounds) ctrler = UIViewController() diff --git a/Tests/SteviaTests/CenterTests.swift b/Tests/SteviaTests/CenterTests.swift index e0205795..cadf6ce4 100644 --- a/Tests/SteviaTests/CenterTests.swift +++ b/Tests/SteviaTests/CenterTests.swift @@ -22,7 +22,7 @@ class CenterTests: XCTestCase { ctrler = UIViewController() win.rootViewController = ctrler v = UIView() - ctrler.view.subviews { v } + ctrler.view.subviews { v! } // verify view h as default values XCTAssertEqual(v.frame.origin.y, 0, accuracy: CGFloat(Float.ulpOfOne)) diff --git a/Tests/SteviaTests/FlexibleMarginTests.swift b/Tests/SteviaTests/FlexibleMarginTests.swift index b9251f88..f3f26842 100644 --- a/Tests/SteviaTests/FlexibleMarginTests.swift +++ b/Tests/SteviaTests/FlexibleMarginTests.swift @@ -21,7 +21,7 @@ class FlexibleMarginTests: XCTestCase { ctrler = UIViewController() win.rootViewController = ctrler v = UIView() - ctrler.view.subviews { v } + ctrler.view.subviews { v! } v.size(100.0) } diff --git a/Tests/SteviaTests/FullLayoutTests.swift b/Tests/SteviaTests/FullLayoutTests.swift index 356b698b..26960413 100644 --- a/Tests/SteviaTests/FullLayoutTests.swift +++ b/Tests/SteviaTests/FullLayoutTests.swift @@ -84,7 +84,7 @@ class FullLayoutTests: XCTestCase { v.layoutIfNeeded() // Email - XCTAssertEqual(v.email.frame.origin.y, 100.5, accuracy: CGFloat(Float.ulpOfOne)) + XCTAssertEqual(v.email.frame.origin.y, 100.5, accuracy: 0.5) XCTAssertEqual(v.email.frame.origin.x, 8, accuracy: CGFloat(Float.ulpOfOne)) XCTAssertEqual(v.email.frame.width, win.frame.width - 8 - 22, accuracy: CGFloat(Float.ulpOfOne)) @@ -120,7 +120,7 @@ class FullLayoutTests: XCTestCase { v.layoutIfNeeded() // Email - XCTAssertEqual(v.email.frame.origin.y, 100.5, accuracy: CGFloat(Float.ulpOfOne)) + XCTAssertEqual(v.email.frame.origin.y, 100.5, accuracy: 0.5) XCTAssertEqual(v.email.frame.origin.x, 22, accuracy: CGFloat(Float.ulpOfOne)) XCTAssertEqual(v.email.frame.width, win.frame.width - 8 - 22, accuracy: CGFloat(Float.ulpOfOne)) diff --git a/Tests/SteviaTests/GetConstraintsTests.swift b/Tests/SteviaTests/GetConstraintsTests.swift index d6e369c0..2a33b2fa 100644 --- a/Tests/SteviaTests/GetConstraintsTests.swift +++ b/Tests/SteviaTests/GetConstraintsTests.swift @@ -17,7 +17,7 @@ class GetConstraintsTests: XCTestCase { override func setUp() { spv = UIView() v = UIView() - spv.subviews { v } + spv.subviews { v! } } func testCanGetLeftConstraint() { diff --git a/Tests/SteviaTests/LayoutTests.swift b/Tests/SteviaTests/LayoutTests.swift index 24783671..77a0628f 100644 --- a/Tests/SteviaTests/LayoutTests.swift +++ b/Tests/SteviaTests/LayoutTests.swift @@ -21,7 +21,7 @@ class LayoutTests: XCTestCase { ctrler = UIViewController() win.rootViewController = ctrler v = UIView() - ctrler.view.subviews { v } + ctrler.view.subviews { v! } verifyViewHasDefaultValues() } diff --git a/Tests/SteviaTests/PositionTests.swift b/Tests/SteviaTests/PositionTests.swift index 4b3926cd..e20af419 100644 --- a/Tests/SteviaTests/PositionTests.swift +++ b/Tests/SteviaTests/PositionTests.swift @@ -21,7 +21,7 @@ class PositionTests: XCTestCase { ctrler = UIViewController() win.rootViewController = ctrler v = UIView() - ctrler.view.subviews {v } + ctrler.view.subviews { v! } v.size(100.0) } diff --git a/Tests/SteviaTests/SizeTests.swift b/Tests/SteviaTests/SizeTests.swift index c8cf226c..b1b6fef1 100644 --- a/Tests/SteviaTests/SizeTests.swift +++ b/Tests/SteviaTests/SizeTests.swift @@ -22,7 +22,7 @@ class SizeTests: XCTestCase { win.rootViewController = ctrler v = UIView() ctrler.view.subviews { - v + v! } } @@ -207,7 +207,7 @@ class SizeTests: XCTestCase { v.removeFromSuperview() v.height(80) v.width(80) - ctrler.view?.subviews { v } + ctrler.view?.subviews { v! } let view: UIView = ctrler.view view.layout { diff --git a/Tests/SteviaTests/StyleTests.swift b/Tests/SteviaTests/StyleTests.swift index 55a9e3da..326b2ecc 100644 --- a/Tests/SteviaTests/StyleTests.swift +++ b/Tests/SteviaTests/StyleTests.swift @@ -37,6 +37,4 @@ class StyleTests: XCTestCase { } XCTAssertEqual(label.textColor, UIColor.blue) } - - }