Files
swift-mirror/test/Concurrency/Backdeploy/objc_actor.swift
Kuba (Brecka) Mracek 7853184ed6 Enable running tests from test/Concurrency/ directory in freestanding/minimal presets (#61835)
* Enable running tests from test/Concurrency/ directory in freestanding/minimal presets

* Mark failing Concurrency tests as XFAIL/SKIP on freestanding/minimal
2022-11-04 09:07:27 -07:00

25 lines
555 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift -target %target-cpu-apple-macosx11 %s -o %t/test_backdeploy -Xfrontend -parse-as-library
// RUN: %target-run %t/test_backdeploy
// REQUIRES: OS=macosx
// REQUIRES: executable_test
// REQUIRES: concurrency_runtime
// REQUIRES: objc_interop
// UNSUPPORTED: back_deployment_runtime
import Foundation
@objc actor MyActor {
func f() -> String { "hello" }
}
@main
enum Main {
static func main() async {
let ma = MyActor()
let greeting = await ma.f()
assert(greeting == "hello")
}
}