Skip to content

Commit f1e7164

Browse files
wasm: disable crash tests for actor preconditions
1 parent fae1e28 commit f1e7164

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test/Concurrency/Runtime/actor_assert_precondition_executor.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ actor Someone {
7878
await MainFriend().callCheckMainActor()
7979
}
8080

81+
#if !os(WASI)
8182
tests.test("precondition on actor (main): wrongly assume the main executor, from actor on other executor") {
8283
expectCrashLater(withMessage: "Incorrect actor executor assumption; Expected 'MainActor' executor.")
8384
await Someone().callCheckMainActor()
8485
}
86+
#endif
8587

8688
// === Global actor -----------------------------------------------------
8789

@@ -94,4 +96,4 @@ actor Someone {
9496

9597
await runAllTestsAsync()
9698
}
97-
}
99+
}

test/Concurrency/Runtime/actor_assume_executor.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,17 @@ final class MainActorEcho {
115115
await MainFriend().callCheck(echo: echo)
116116
}
117117

118+
#if !os(WASI)
118119
tests.test("MainActor.assumeIsolated: wrongly assume the main executor, from actor on other executor") {
119120
expectCrashLater(withMessage: "Incorrect actor executor assumption; Expected 'MainActor' executor.")
120121
await Someone().callCheckMainActor(echo: echo)
121122
}
123+
#endif
122124

123125
// === some Actor -------------------------------------------------------
124126

125127
let someone = Someone()
128+
#if !os(WASI)
126129
tests.test("assumeOnActorExecutor: wrongly assume someone's executor, from 'main() async'") {
127130
expectCrashLater(withMessage: "Incorrect actor executor assumption; Expected same executor as a.Someone.")
128131
checkAssumeSomeone(someone: someone)
@@ -132,6 +135,7 @@ final class MainActorEcho {
132135
expectCrashLater(withMessage: "Incorrect actor executor assumption; Expected same executor as a.Someone.")
133136
checkAssumeSomeone(someone: someone)
134137
}
138+
#endif
135139

136140
tests.test("assumeOnActorExecutor: assume someone's executor, from Someone") {
137141
await someone.callCheckSomeone()
@@ -141,10 +145,12 @@ final class MainActorEcho {
141145
await SomeonesFriend(someone: someone).callCheckSomeone()
142146
}
143147

148+
#if !os(WASI)
144149
tests.test("assumeOnActorExecutor: wrongly assume the main executor, from actor on other executor") {
145150
expectCrashLater(withMessage: "Incorrect actor executor assumption; Expected same executor as a.Someone.")
146151
await CompleteStranger(someone: someone).callCheckSomeone()
147152
}
153+
#endif
148154

149155

150156
}

0 commit comments

Comments
 (0)