[test] adjust backdeployment testing

This commit is contained in:
Guillaume Lessard
2025-08-28 10:37:07 -07:00
parent a5fa3edf54
commit 833ed3c662

View File

@@ -10,11 +10,10 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// RUN: %target-run-stdlib-swift -enable-experimental-feature LifetimeDependence // RUN: %target-run-stdlib-swift
// REQUIRES: executable_test // REQUIRES: executable_test
// REQUIRES: objc_interop // REQUIRES: objc_interop
// REQUIRES: swift_feature_LifetimeDependence
import StdlibUnittest import StdlibUnittest
@@ -24,6 +23,7 @@ var suite = TestSuite("EagerLazyBridgingTests")
defer { runAllTests() } defer { runAllTests() }
suite.test("Bridged NSArray without direct memory sharing") { suite.test("Bridged NSArray without direct memory sharing") {
guard #available(SwiftStdlib 6.2, *) else { return }
var arr = (0..<100).map({ _ in NSObject() as AnyObject}) var arr = (0..<100).map({ _ in NSObject() as AnyObject})
let identifiers = arr.map(ObjectIdentifier.init) let identifiers = arr.map(ObjectIdentifier.init)
@@ -45,11 +45,7 @@ suite.test("Bridged NSArray without direct memory sharing") {
} }
suite.test("Bridged NSArray as Span") suite.test("Bridged NSArray as Span")
.skip(.custom( .require(.stdlib_6_2).code {
{ if #available(SwiftStdlib 6.2, *) { false } else { true } },
reason: "Requires Swift 6.2's standard library"
))
.code {
guard #available(SwiftStdlib 6.2, *) else { return } guard #available(SwiftStdlib 6.2, *) else { return }
var arr = (0..<100).map({ _ in NSObject() as AnyObject}) var arr = (0..<100).map({ _ in NSObject() as AnyObject})