Skip to content

Commit

Permalink
Merge pull request #65 from mpiechocki/update-tests-to-swift4.2
Browse files Browse the repository at this point in the history
Update tests to swift 4.2
  • Loading branch information
ZevEisenberg committed Oct 18, 2018
2 parents 38e928a + 2d97deb commit 89c3b60
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions AnchorageTests/AnchorageTests.swift
Expand Up @@ -16,7 +16,9 @@
import XCTest

#if swift(>=4.0)
public typealias ConstraintAttribute = NSLayoutConstraint.Attribute
#else
public typealias ConstraintAttribute = NSLayoutAttribute
func XCTAssertEqual<T>(_ expression1: @autoclosure () throws -> T, _ expression2: @autoclosure () throws -> T, accuracy: T, _ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line) where T : FloatingPoint {
XCTAssertEqualWithAccuracy(expression1, expression2, accuracy: accuracy, message, file: file, line: line)
}
Expand All @@ -30,12 +32,10 @@ import XCTest
let TestPriorityRequired = NSLayoutConstraint.Priority.required
let TestPriorityHigh = NSLayoutConstraint.Priority.defaultHigh
let TestPriorityLow = NSLayoutConstraint.Priority.defaultLow
public typealias ConstraintAttribute = NSLayoutConstraint.Attribute
#else
let TestPriorityRequired = NSLayoutPriorityRequired
let TestPriorityHigh = NSLayoutPriorityDefaultHigh
let TestPriorityLow = NSLayoutPriorityDefaultLow
public typealias ConstraintAttribute = NSLayoutAttribute
#endif

#else
Expand All @@ -51,8 +51,6 @@ import XCTest
let TestPriorityHigh = UILayoutPriorityDefaultHigh
let TestPriorityLow = UILayoutPriorityDefaultLow
#endif

public typealias ConstraintAttribute = NSLayoutAttribute
#endif

let cgEpsilon: CGFloat = 0.00001
Expand Down

0 comments on commit 89c3b60

Please sign in to comment.