|
@@ -1,4 +1,4 @@
|
|
|
-#if os(iOS) || os(tvOS)
|
|
|
|
|
|
|
+#if canImport(UIKit)
|
|
|
import UIKit
|
|
import UIKit
|
|
|
typealias View = UIView
|
|
typealias View = UIView
|
|
|
extension View {
|
|
extension View {
|
|
@@ -453,7 +453,7 @@ class SnapKitTests: XCTestCase {
|
|
|
XCTAssertEqual(constraints[3].constant, -25, "Should be -25")
|
|
XCTAssertEqual(constraints[3].constant, -25, "Should be -25")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- #if os(iOS) || os(tvOS)
|
|
|
|
|
|
|
+ #if canImport(UIKit)
|
|
|
@available(iOS 11.0, tvOS 11.0, *)
|
|
@available(iOS 11.0, tvOS 11.0, *)
|
|
|
func testConstraintDirectionalInsetsAsImpliedEqualToConstraints() {
|
|
func testConstraintDirectionalInsetsAsImpliedEqualToConstraints() {
|
|
|
let view = View()
|
|
let view = View()
|
|
@@ -481,7 +481,7 @@ class SnapKitTests: XCTestCase {
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
- #if os(iOS) || os(tvOS)
|
|
|
|
|
|
|
+ #if canImport(UIKit)
|
|
|
@available(iOS 11.0, tvOS 11.0, *)
|
|
@available(iOS 11.0, tvOS 11.0, *)
|
|
|
func testConstraintDirectionalInsetsAsConstraintsConstant() {
|
|
func testConstraintDirectionalInsetsAsConstraintsConstant() {
|
|
|
let view = View()
|
|
let view = View()
|
|
@@ -509,7 +509,7 @@ class SnapKitTests: XCTestCase {
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
- #if os(iOS) || os(tvOS)
|
|
|
|
|
|
|
+ #if canImport(UIKit)
|
|
|
@available(iOS 11.0, tvOS 11.0, *)
|
|
@available(iOS 11.0, tvOS 11.0, *)
|
|
|
func testConstraintDirectionalInsetsFallBackForNonDirectionalConstraints() {
|
|
func testConstraintDirectionalInsetsFallBackForNonDirectionalConstraints() {
|
|
|
let view = View()
|
|
let view = View()
|
|
@@ -638,7 +638,7 @@ class SnapKitTests: XCTestCase {
|
|
|
XCTAssert(toAttributes == [.top, .leading, .bottom, .trailing])
|
|
XCTAssert(toAttributes == [.top, .leading, .bottom, .trailing])
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- #if os(iOS) || os(tvOS)
|
|
|
|
|
|
|
+ #if canImport(UIKit)
|
|
|
func testEdgesToMargins() {
|
|
func testEdgesToMargins() {
|
|
|
var fromAttributes = Set<LayoutAttribute>()
|
|
var fromAttributes = Set<LayoutAttribute>()
|
|
|
var toAttributes = Set<LayoutAttribute>()
|
|
var toAttributes = Set<LayoutAttribute>()
|