diff options
| author | Alexandros Naskos <alex_naskos@hotmail.com> | 2020-10-04 10:39:26 +0300 |
|---|---|---|
| committer | Alexandros Naskos <alex_naskos@hotmail.com> | 2020-10-04 10:39:26 +0300 |
| commit | 23cd3b33312ea5fcae32dcb6cd53cbd502361ce9 (patch) | |
| tree | eae3657140271fb945dae6e4e1ad9c788808ac58 /lib/std/packed_int_array.zig | |
| parent | 82f0ede3ad4150a80ab745419664f1dce4a6be9c (diff) | |
| parent | 8170a3d574a7118a6ee616d1b1258b2e839de173 (diff) | |
| download | zig-23cd3b33312ea5fcae32dcb6cd53cbd502361ce9.tar.gz zig-23cd3b33312ea5fcae32dcb6cd53cbd502361ce9.zip | |
Merge branch 'master' of https://github.com/ziglang/zig into add_some_frees
Diffstat (limited to 'lib/std/packed_int_array.zig')
| -rw-r--r-- | lib/std/packed_int_array.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/std/packed_int_array.zig b/lib/std/packed_int_array.zig index de99afa303..f25ff0b1b8 100644 --- a/lib/std/packed_int_array.zig +++ b/lib/std/packed_int_array.zig @@ -318,9 +318,12 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: builtin.Endian) }; } +const we_are_testing_this_with_stage1_which_leaks_comptime_memory = true; + test "PackedIntArray" { // TODO @setEvalBranchQuota generates panics in wasm32. Investigate. if (builtin.arch == .wasm32) return error.SkipZigTest; + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; @setEvalBranchQuota(10000); const max_bits = 256; @@ -358,6 +361,7 @@ test "PackedIntArray" { } test "PackedIntArray init" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; const PackedArray = PackedIntArray(u3, 8); var packed_array = PackedArray.init([_]u3{ 0, 1, 2, 3, 4, 5, 6, 7 }); var i = @as(usize, 0); @@ -367,6 +371,7 @@ test "PackedIntArray init" { test "PackedIntSlice" { // TODO @setEvalBranchQuota generates panics in wasm32. Investigate. if (builtin.arch == .wasm32) return error.SkipZigTest; + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; @setEvalBranchQuota(10000); const max_bits = 256; @@ -405,6 +410,7 @@ test "PackedIntSlice" { } test "PackedIntSlice of PackedInt(Array/Slice)" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; const max_bits = 16; const int_count = 19; @@ -470,6 +476,7 @@ test "PackedIntSlice of PackedInt(Array/Slice)" { } test "PackedIntSlice accumulating bit offsets" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; //bit_offset is u3, so standard debugging asserts should catch // anything { @@ -497,6 +504,8 @@ test "PackedIntSlice accumulating bit offsets" { //@NOTE: As I do not have a big endian system to test this on, // big endian values were not tested test "PackedInt(Array/Slice) sliceCast" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; + const PackedArray = PackedIntArray(u1, 16); var packed_array = PackedArray.init([_]u1{ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 }); const packed_slice_cast_2 = packed_array.sliceCast(u2); @@ -537,6 +546,8 @@ test "PackedInt(Array/Slice) sliceCast" { } test "PackedInt(Array/Slice)Endian" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; + { const PackedArrayBe = PackedIntArrayEndian(u4, .Big, 8); var packed_array_be = PackedArrayBe.init([_]u4{ 0, 1, 2, 3, 4, 5, 6, 7 }); @@ -604,6 +615,8 @@ test "PackedInt(Array/Slice)Endian" { // after this one is not mapped and will cause a segfault if we // don't account for the bounds. test "PackedIntArray at end of available memory" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; + switch (builtin.os.tag) { .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {}, else => return, @@ -623,6 +636,8 @@ test "PackedIntArray at end of available memory" { } test "PackedIntSlice at end of available memory" { + if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; + switch (builtin.os.tag) { .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {}, else => return, |
