Files
swift-mirror/test/Interpreter/objc_implementation_resilience_objc_client.m
Daniel Rodríguez Troitiño ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00

32 lines
2.0 KiB
Matlab

// Variant of Interpreter/objc_implementation_objc_client.m that tests resilient stored properties.
// Will not execute correctly without ObjC runtime support.
// REQUIRES: rdar109171643
// REQUIRES-X: rdar101497120
//
// Build objc_implementation.framework
//
// RUN: %empty-directory(%t-frameworks)
// RUN: %empty-directory(%t-frameworks/objc_implementation.framework/Modules/objc_implementation.swiftmodule)
// RUN: %empty-directory(%t-frameworks/objc_implementation.framework/Headers)
// RUN: cp %S/Inputs/objc_implementation.modulemap %t-frameworks/objc_implementation.framework/Modules/module.modulemap
// RUN: cp %S/Inputs/objc_implementation.h %t-frameworks/objc_implementation.framework/Headers
// RUN: %target-build-swift-dylib(%t-frameworks/objc_implementation.framework/objc_implementation) -emit-module-path %t-frameworks/objc_implementation.framework/Modules/objc_implementation.swiftmodule/%module-target-triple.swiftmodule -module-name objc_implementation -F %t-frameworks -import-underlying-module -Xlinker -install_name -Xlinker %t-frameworks/objc_implementation.framework/objc_implementation %S/objc_implementation.swift -D RESILIENCE -enable-experimental-feature CImplementation -enable-experimental-feature ObjCImplementationWithResilientStorage -target %target-future-triple
//
// Execute this file
//
// RUN: %empty-directory(%t)
// RUN: %target-clang %S/objc_implementation_objc_client.m -isysroot %sdk -F %t-frameworks -lobjc -fmodules -fobjc-arc -o %t/objc_implementation_objc_client -D RESILIENCE
// RUN: %target-codesign %t/objc_implementation_objc_client
// RUN: %target-run %t/objc_implementation_objc_client 2>&1 | %FileCheck %S/objc_implementation_objc_client.m --check-prefixes CHECK,CHECK-RESILIENCE
// REQUIRES: executable_test
// REQUIRES: objc_interop
// FIXME: This test fails in Swift CI simulators, but I have not been able to
// reproduce this locally.
// REQUIRES: OS=macosx
// REQUIRES: swift_feature_CImplementation
// REQUIRES: swift_feature_ObjCImplementationWithResilientStorage