Skip to content

Commit 55c932c

Browse files
authored
[Distributed] Bring back module interface test for DA (#70199)
1 parent 39d3058 commit 55c932c

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-emit-module-interface(%t/TestResilient.swiftinterface) %s -module-name TestResilient
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/TestResilient.swiftinterface) -module-name TestResilient
4+
// RUN: %FileCheck %s < %t/TestResilient.swiftinterface
5+
// RUN: %target-swift-frontend -compile-module-from-interface -swift-version 5 %t/TestResilient.swiftinterface -o %t/TestResilient.swiftmodule
6+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules -swift-version 5 -emit-module-interface-path - %t/TestResilient.swiftmodule -module-name TestResilient | %FileCheck %s
7+
import Distributed
8+
9+
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
10+
public typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem
11+
12+
// CHECK: {{.*}}distributed {{.*}} actor CheckMe
13+
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
14+
public distributed actor CheckMe {
15+
distributed func test() {
16+
// ...
17+
}
18+
19+
}
20+
21+
// CHECK: public struct HasDistributedActors
22+
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
23+
public struct HasDistributedActors {
24+
let check: CheckMe
25+
26+
func test() async throws {
27+
try await check.test()
28+
}
29+
}

0 commit comments

Comments
 (0)