Skip to content

[test] Reenable NSValueBridging tests on i386 CPUs #32781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions test/stdlib/NSValueBridging.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,11 @@
//
// REQUIRES: objc_interop

// The UIKit overlay isn't present on iOS 10.3.
// UNSUPPORTED: CPU=i386

import StdlibUnittest
import StdlibUnittestFoundationExtras
import Foundation
import CoreGraphics

#if canImport(UIKit)
import UIKit
#endif

var nsValueBridging = TestSuite("NSValueBridging")

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

#endif

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

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