Skip to content

Commit ed7043c

Browse files
authored
test/stdlib/TemporaryAllocation.swift: disable crashing tests on WASI
1 parent 94271b5 commit ed7043c

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
@@ -70,6 +70,7 @@ TemporaryAllocationTestSuite.test("untypedEmptyAllocationIsStackAllocated") {
7070
}
7171
}
7272

73+
#if !os(WASI)
7374
TemporaryAllocationTestSuite.test("crashOnNegativeByteCount") {
7475
expectCrash {
7576
let byteCount = Int.random(in: -2 ..< -1)
@@ -83,6 +84,7 @@ TemporaryAllocationTestSuite.test("crashOnNegativeAlignment") {
8384
withUnsafeTemporaryAllocation(byteCount: 16, alignment: alignment) { _ in }
8485
}
8586
}
87+
#endif
8688

8789
TemporaryAllocationTestSuite.test("untypedAllocationIsAligned") {
8890
withUnsafeTemporaryAllocation(byteCount: 1, alignment: 8) { buffer in
@@ -136,12 +138,14 @@ TemporaryAllocationTestSuite.test("voidAllocationIsStackAllocated") {
136138
}
137139
}
138140

141+
#if !os(WASI)
139142
TemporaryAllocationTestSuite.test("crashOnNegativeValueCount") {
140143
expectCrash {
141144
let capacity = Int.random(in: -2 ..< -1)
142145
withUnsafeTemporaryAllocation(of: Int.self, capacity: capacity) { _ in }
143146
}
144147
}
148+
#endif
145149

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

0 commit comments

Comments
 (0)