Skip to content

Commit

Permalink
Updates for Xcode 12 (swift-tools-version:5.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
s4cha committed Sep 21, 2020
1 parent e3663c5 commit e1e8dc4
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.3

import PackageDescription

Expand Down
2 changes: 0 additions & 2 deletions Tests/SteviaTests/BaselineTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ class BaselineTests: XCTestCase {
var label1 = UILabel()
var label2 = UILabel()



override func setUp() {
win = UIWindow(frame: UIScreen.main.bounds)
ctrler = UIViewController()
Expand Down
2 changes: 1 addition & 1 deletion Tests/SteviaTests/CenterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion Tests/SteviaTests/FlexibleMarginTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/SteviaTests/FullLayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion Tests/SteviaTests/GetConstraintsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GetConstraintsTests: XCTestCase {
override func setUp() {
spv = UIView()
v = UIView()
spv.subviews { v }
spv.subviews { v! }
}

func testCanGetLeftConstraint() {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SteviaTests/LayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LayoutTests: XCTestCase {
ctrler = UIViewController()
win.rootViewController = ctrler
v = UIView()
ctrler.view.subviews { v }
ctrler.view.subviews { v! }
verifyViewHasDefaultValues()
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/SteviaTests/PositionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/SteviaTests/SizeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SizeTests: XCTestCase {
win.rootViewController = ctrler
v = UIView()
ctrler.view.subviews {
v
v!
}
}

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions Tests/SteviaTests/StyleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ class StyleTests: XCTestCase {
}
XCTAssertEqual(label.textColor, UIColor.blue)
}


}

0 comments on commit e1e8dc4

Please sign in to comment.