Skip to content

Commit 5c3f34f

Browse files
authored
Merge pull request #32781 from lorentey/NValueBridging-adjustment
[test] Reenable NSValueBridging tests on i386 CPUs
2 parents 2e02377 + b42910a commit 5c3f34f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/stdlib/NSValueBridging.swift.gyb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,11 @@
1818
//
1919
// REQUIRES: objc_interop
2020

21-
// The UIKit overlay isn't present on iOS 10.3.
22-
// UNSUPPORTED: CPU=i386
23-
2421
import StdlibUnittest
2522
import StdlibUnittestFoundationExtras
2623
import Foundation
2724
import CoreGraphics
2825

29-
#if canImport(UIKit)
30-
import UIKit
31-
#endif
32-
3326
var nsValueBridging = TestSuite("NSValueBridging")
3427

3528
func rangesEqual(_ x: NSRange, _ y: NSRange) -> Bool {
@@ -73,7 +66,13 @@ ${ testCase("CGAffineTransform", "CGAffineTransform(rotationAngle: .pi)", N
7366

7467
#endif
7568

76-
#if canImport(UIKit)
69+
// The last supported iOS version for 32-bit platforms is iOS 10.3, which didn't
70+
// ship with the UIKit overlay, so we cannot run NSValue bridging tests there.
71+
//
72+
// FIXME: Test back-deployment scenarios with the Swift 5.0 compatibility
73+
// runtime rather than a freshly built stdlib. (rdar://62694723)
74+
#if canImport(UIKit) && !(os(iOS) && (arch(armv7) || arch(armv7s) || arch(i386)))
75+
import UIKit
7776

7877
${ testCase("CGRect", "CGRect(x: 17, y: 38, width: 6, height: 79)", "cgRect", "(==)") }
7978
${ testCase("CGPoint", "CGPoint(x: 17, y: 38)", "cgPoint", "(==)") }

0 commit comments

Comments
 (0)