Files
swift-mirror/test/Concurrency/Runtime/executor_deinit1.swift
Arnold Schwaighofer 970034441a Disable executor_deinit1.swift test in optimized mode
It fails on some bots.

rdar://77658743
2021-05-07 09:17:00 -07:00

40 lines
996 B
Swift

// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -enable-experimental-concurrency %import-libdispatch) | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: libdispatch
// UNSUPPORTED: use_os_stdlib
// UNSUPPORTED: back_deployment_runtime
// https://bugs.swift.org/browse/SR-14461
// UNSUPPORTED: linux
// rdar://77658743
// UNSUPPORTED: swift_test_mode_optimize
// UNSUPPORTED: swift_test_mode_optimize_size
// doesn't matter that it's bool identity function or not
func boolIdentityFn(_ x : Bool) -> Bool { return x }
actor FirstActor {
func startTest() { // whether startTest is async or sync doesn't matter
// do not remove this call or if-statement.
if boolIdentityFn(true) {}
}
deinit {
// CHECK: called deinit
print("called deinit")
}
}
@main struct RunIt {
static func main() async {
let actor = FirstActor()
await actor.startTest() // do not remove this call
}
}