Skip to content

Commit d79a78e

Browse files
committed
pr review followup
1 parent 7d0062e commit d79a78e

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

test/Distributed/Runtime/distributed_actor_library_evolution_da_protocol_use.swift

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
// RUN: %target-build-swift -Xfrontend -validate-tbd-against-ir=all -target %target-cpu-apple-macosx13.0 -parse-as-library -lLibrary -module-name main -I %t -L %t %t/main.swift -o %t/a.out
1212

1313
// RUN: %target-codesign %t/a.out
14-
// RUN: %target-run %t/a.out
14+
// RUN: %target-run %t/a.out | %FileCheck %s
1515

1616
//--- library.swift
1717
import Distributed
1818

19-
//public protocol NormalProtocol {
20-
// func NORMAL() async -> Int
21-
//}
22-
2319
public protocol SimpleProtocol: DistributedActor
2420
where ActorSystem == LocalTestingDistributedActorSystem {
2521

@@ -33,35 +29,26 @@ public protocol SimpleProtocol: DistributedActor
3329
import Distributed
3430
import Library
3531

36-
//actor NormalActor: NormalProtocol {
37-
// func NORMAL() async -> Int { 1 }
38-
//}
39-
4032
public distributed actor SimpleActor: SimpleProtocol {
41-
public distributed func test() -> Int { 1 }
42-
}
43-
44-
// Passes
45-
public func makeFromPass<Act: DistributedActor>(_ act: Act) {
46-
print(act.id)
33+
public distributed func test() -> Int {
34+
print("SimpleActor.test")
35+
return 1
36+
}
4737
}
4838

49-
// Fails
5039
public func makeFromFail<Act: SimpleProtocol>(_ act: Act) async {
5140
print(act.id)
52-
try! await print(act.test())
41+
try! await print("act.test() = \(act.test())")
42+
// CHECK: SimpleActor.test
43+
// CHECK: act.test() = 1
5344
}
5445

5546
@main
5647
struct TestSwiftFrameworkTests {
5748
static func main() async {
5849
let system = LocalTestingDistributedActorSystem()
5950

60-
// let norm = NormalActor()
61-
6251
let simpleActor = SimpleActor(actorSystem: system)
63-
// makeFromPass(simpleActor)
64-
6552
await makeFromFail(simpleActor)
6653
}
6754
}

0 commit comments

Comments
 (0)