diff options
| author | 2021-10-23 22:57:01 -0700 | |
|---|---|---|
| committer | 2021-10-23 22:57:01 -0700 | |
| commit | 4bbb938de885c49ccbabf15cae7271f51145b9a4 (patch) | |
| tree | 7c8252f91fc4da4b3cdb3a825878c2dc10c2c6b8 | |
| parent | 437270e0af0f42b13cc90ed7e22df0ba138d62c2 (diff) | |
| download | bun-4bbb938de885c49ccbabf15cae7271f51145b9a4.tar.gz bun-4bbb938de885c49ccbabf15cae7271f51145b9a4.tar.zst bun-4bbb938de885c49ccbabf15cae7271f51145b9a4.zip | |
Comment out WASM test since WASM is currently unsupported
| -rw-r--r-- | src/alloc.zig | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/alloc.zig b/src/alloc.zig index 8d3e3520b..774671727 100644 --- a/src/alloc.zig +++ b/src/alloc.zig @@ -161,36 +161,37 @@ pub const Hunk = struct { } }; -test "Hunk" { - // test a few random operations. very low coverage. write more later - var buf: [100]u8 = undefined; - var hunk = Hunk.init(buf[0..]); +// WASM only +// test "Hunk" { +// // test a few random operations. very low coverage. write more later +// var buf: [100]u8 = undefined; +// var hunk = Hunk.init(buf[0..]); - const high_mark = hunk.getHighMark(); +// const high_mark = hunk.getHighMark(); - _ = try hunk.low().allocator.alloc(u8, 7); - _ = try hunk.high().allocator.alloc(u8, 8); +// _ = try hunk.low().allocator.alloc(u8, 7); +// _ = try hunk.high().allocator.alloc(u8, 8); - std.testing.expectEqual(@as(usize, 7), hunk.low_used); - std.testing.expectEqual(@as(usize, 8), hunk.high_used); +// std.testing.expectEqual(@as(usize, 7), hunk.low_used); +// std.testing.expectEqual(@as(usize, 8), hunk.high_used); - _ = try hunk.high().allocator.alloc(u8, 8); +// _ = try hunk.high().allocator.alloc(u8, 8); - std.testing.expectEqual(@as(usize, 16), hunk.high_used); +// std.testing.expectEqual(@as(usize, 16), hunk.high_used); - const low_mark = hunk.getLowMark(); +// const low_mark = hunk.getLowMark(); - _ = try hunk.low().allocator.alloc(u8, 100 - 7 - 16); +// _ = try hunk.low().allocator.alloc(u8, 100 - 7 - 16); - std.testing.expectEqual(@as(usize, 100 - 16), hunk.low_used); +// std.testing.expectEqual(@as(usize, 100 - 16), hunk.low_used); - std.testing.expectError(error.OutOfMemory, hunk.high().allocator.alloc(u8, 1)); +// std.testing.expectError(error.OutOfMemory, hunk.high().allocator.alloc(u8, 1)); - hunk.freeToLowMark(low_mark); +// hunk.freeToLowMark(low_mark); - _ = try hunk.high().allocator.alloc(u8, 1); +// _ = try hunk.high().allocator.alloc(u8, 1); - hunk.freeToHighMark(high_mark); +// hunk.freeToHighMark(high_mark); - std.testing.expectEqual(@as(usize, 0), hunk.high_used); -} +// std.testing.expectEqual(@as(usize, 0), hunk.high_used); +// } |
