Skip to content

Commit 2424048

Browse files
[test] disable crash tests in stdlib/TemporaryAllocation.swift for wasi
1 parent a607ea9 commit 2424048

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/stdlib/TemporaryAllocation.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ TemporaryAllocationTestSuite.test("untypedEmptyAllocationIsStackAllocated") {
5555
}
5656
}
5757

58+
#if !os(WASI)
5859
TemporaryAllocationTestSuite.test("crashOnNegativeByteCount") {
5960
expectCrash {
6061
let byteCount = Int.random(in: -2 ..< -1)
@@ -68,6 +69,7 @@ TemporaryAllocationTestSuite.test("crashOnNegativeAlignment") {
6869
withUnsafeTemporaryAllocation(byteCount: 16, alignment: alignment) { _ in }
6970
}
7071
}
72+
#endif
7173

7274
TemporaryAllocationTestSuite.test("untypedAllocationIsAligned") {
7375
withUnsafeTemporaryAllocation(byteCount: 1, alignment: 8) { buffer in
@@ -106,12 +108,14 @@ TemporaryAllocationTestSuite.test("voidAllocationIsStackAllocated") {
106108
}
107109
}
108110

111+
#if !os(WASI)
109112
TemporaryAllocationTestSuite.test("crashOnNegativeValueCount") {
110113
expectCrash {
111114
let capacity = Int.random(in: -2 ..< -1)
112115
withUnsafeTemporaryAllocation(of: Int.self, capacity: capacity) { _ in }
113116
}
114117
}
118+
#endif
115119

116120
TemporaryAllocationTestSuite.test("typedAllocationIsAligned") {
117121
withUnsafeTemporaryAllocation(of: Int.self, capacity: 1) { buffer in

0 commit comments

Comments
 (0)