Skip to content

Commit a7142c8

Browse files
authored
test/stdlib/UnsafeRawPointer.swift: disable crashing tests on WASI
1 parent ed7043c commit a7142c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/stdlib/UnsafeRawPointer.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ UnsafeMutableRawPointerExtraTestSuite.test("load.unaligned")
131131
expectEqual(result, 0xffff_0000)
132132
}
133133

134+
#if !os(WASI)
134135
UnsafeMutableRawPointerExtraTestSuite.test("load.invalid")
135136
.skip(.custom({ !_isDebugAssertConfiguration() },
136137
reason: "This tests a debug precondition.."))
@@ -154,6 +155,7 @@ UnsafeMutableRawPointerExtraTestSuite.test("load.invalid.mutable")
154155
}
155156
expectUnreachable()
156157
}
158+
#endif
157159

158160
UnsafeMutableRawPointerExtraTestSuite.test("store.unaligned")
159161
.skip(.custom({
@@ -184,6 +186,7 @@ UnsafeMutableRawPointerExtraTestSuite.test("store.unaligned")
184186
0)
185187
}
186188

189+
#if !os(WASI)
187190
UnsafeMutableRawPointerExtraTestSuite.test("store.invalid")
188191
.skip(.custom({ !_isDebugAssertConfiguration() },
189192
reason: "This tests a debug precondition.."))
@@ -203,6 +206,7 @@ UnsafeMutableRawPointerExtraTestSuite.test("store.invalid")
203206
p1.storeBytes(of: m, as: Missile.self)
204207
expectUnreachable()
205208
}
209+
#endif
206210

207211
UnsafeMutableRawPointerExtraTestSuite.test("copyMemory") {
208212
let sizeInBytes = 4 * MemoryLayout<Int>.stride

0 commit comments

Comments
 (0)