Skip to content

Fix test using assume APIs, which landed concurrently to API renames #64890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/Concurrency/Runtime/actor_assume_executor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,19 @@ final class MainActorEcho {
if #available(SwiftStdlib 5.9, *) {
// === MainActor --------------------------------------------------------

tests.test("assumeOnMainActorExecutor: assume the main executor, from 'main() async'") {
tests.test("MainActor.assumeIsolated: assume the main executor, from 'main() async'") {
await checkAssumeMainActor(echo: echo)
}

tests.test("assumeOnMainActorExecutor: assume the main executor, from MainActor method") {
tests.test("MainActor.assumeIsolated: assume the main executor, from MainActor method") {
await mainActorCallCheck(echo: echo)
}

tests.test("assumeOnMainActorExecutor: assume the main executor, from actor on MainActor executor") {
tests.test("MainActor.assumeIsolated: assume the main executor, from actor on MainActor executor") {
await MainFriend().callCheck(echo: echo)
}

tests.test("assumeOnMainActorExecutor: wrongly assume the main executor, from actor on other executor") {
tests.test("MainActor.assumeIsolated: wrongly assume the main executor, from actor on other executor") {
expectCrashLater(withMessage: "Incorrect actor executor assumption; Expected 'MainActor' executor.")
await Someone().callCheckMainActor(echo: echo)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ distributed actor FiveSevenActor_NothingExecutor {
defer {
print("done executed: \(#function)")
}
assumeOnMainActorExecutor {
MainActor.assumeIsolated {
// ignore
}
}
Expand All @@ -52,7 +52,7 @@ distributed actor FiveNineActor_NothingExecutor {
defer {
print("done executed: \(#function)")
}
assumeOnMainActorExecutor {
MainActor.assumeIsolated {
// ignore
}
}
Expand All @@ -71,7 +71,7 @@ distributed actor FiveSevenActor_FiveNineExecutor {
defer {
print("done executed: \(#function)")
}
assumeOnMainActorExecutor {
MainActor.assumeIsolated {
// ignore
}
}
Expand Down