Files
swift-mirror/test/Runtime/stable-bit-backward-deployment.swift
Mike Ash 80bb78d01d [Test] Change the -target line on some tests to use a minimum of macOS 10.13.
These tests were targeting 10.9 or 10.10, but the minimum deployment target now supported by Xcode is 10.13. Bump them up to match:

test/Concurrency/Backdeploy/linking.swift
test/Concurrency/Backdeploy/linking_maccatalyst.swift
test/Runtime/stable-bit-backward-deployment.swift
2023-02-21 13:48:33 -05:00

31 lines
1010 B
Swift

// RUN: %empty-directory(%t)
// -- Deployment target is set to pre-10.14.4 so that we use the "old"
// Swift runtime bit in compiler-emitted classes
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.13 %s -module-name main -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: OS=macosx
import Foundation
// A fixed-layout class should be considered Swift metadata by the OS runtime.
class FixedLayout { }
debugPrint(FixedLayout.self) // CHECK: main.FixedLayout
// A generic class
class GenericBase<T> { }
debugPrint(GenericBase<Int>.self) // CHECK-NEXT: main.GenericBase<Swift.Int>
// A singleton-initialized class
class SingletonInit: GenericBase<Int> { }
debugPrint(SingletonInit.self) // CHECK-NEXT: main.SingletonInit
// A resilient-heritage class
class ResilientSubInit: JSONEncoder {}
debugPrint(ResilientSubInit.self) // CHECK-NEXT: main.ResilientSubInit
print("nailed it") // CHECK-NEXT: nailed it