Skip to content

Commit 29a89d7

Browse files
[WASM] test/stdlib/Error.swift
1 parent a7d49ca commit 29a89d7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/stdlib/Error.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ ErrorTests.test("default domain and code") {
105105

106106
enum SillyError: Error { case JazzHands }
107107

108+
#if !os(WASI)
108109
ErrorTests.test("try!")
109110
.skip(.custom({ _isFastAssertConfiguration() },
110111
reason: "trap is not guaranteed to happen in -Ounchecked"))
@@ -127,6 +128,7 @@ ErrorTests.test("try!/location")
127128
expectCrashLater()
128129
let _: () = try! { throw SillyError.JazzHands }()
129130
}
131+
#endif
130132

131133
ErrorTests.test("try?") {
132134
var value = try? { () throws -> Int in return 1 }()
@@ -191,6 +193,7 @@ ErrorTests.test("test dealloc empty error box") {
191193
}
192194
}
193195

196+
#if !os(WASI)
194197
var errors: [Error] = []
195198
ErrorTests.test("willThrow") {
196199
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
@@ -215,6 +218,7 @@ ErrorTests.test("willThrow") {
215218
expectEqual(SillyError.self, type(of: errors.last!))
216219
}
217220
}
221+
#endif
218222

219223
runAllTests()
220224

0 commit comments

Comments
 (0)