diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-10-07 00:46:05 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-07 00:46:05 -0700 |
| commit | b5a36f676b1fd69f195d9f1eb6e35f3eb2f15946 (patch) | |
| tree | 92ce1ffa64bc2d32d5ef73dce66daf3c8e893ee6 /lib/std/packed_int_array.zig | |
| parent | d6d05fc84d33c71434a1f8bae51ca5956e08cdf0 (diff) | |
| parent | f2d374e8465042fa5cb6bf2be7b9b086948f3a94 (diff) | |
| download | zig-b5a36f676b1fd69f195d9f1eb6e35f3eb2f15946.tar.gz zig-b5a36f676b1fd69f195d9f1eb6e35f3eb2f15946.zip | |
Merge remote-tracking branch 'origin/master' into llvm11
Conflicts:
cmake/Findllvm.cmake
The llvm11 branch changed 10's to 11's and master branch added the
"using LLVM_CONFIG_EXE" help message, so the resolution was to merge
these changes together.
I also added a check to make sure LLVM is built with AVR enabled, which
is no longer an experimental target.
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, |
