authorgravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-02-13 13:01:55-07:00
committergravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-02-13 13:28:08-07:00
log45aed7171c5cafb06671714ac1b15fdcf056d040
treeda10d6577439580b80ced6dee221c9de95788a01
parentc586e3ba1bbc7784aee22bf96f69b8003611112a

Skip 8/16-bit `@bitCast` test for wasm


1 files changed, 12 insertions(+), 2 deletions(-)

test/behavior/bitcast.zig+12-2
...@@ -6,8 +6,18 @@ const maxInt = std.math.maxInt;...@@ -6,8 +6,18 @@ const maxInt = std.math.maxInt;
6const minInt = std.math.minInt;6const minInt = std.math.minInt;
7const native_endian = builtin.target.cpu.arch.endian();7const native_endian = builtin.target.cpu.arch.endian();
88
9test "@bitCast iX -> uX" {9test "@bitCast iX -> uX (32, 64)" {
10 const bit_values = [_]usize{ 8, 16, 32, 64 };10 const bit_values = [_]usize{ 32, 64 };
11
12 inline for (bit_values) |bits| {
13 try testBitCast(bits);
14 comptime try testBitCast(bits);
15 }
16}
17
18test "@bitCast iX -> uX (8, 16, 128)" {
19 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
20 const bit_values = [_]usize{ 8, 16, 128 };
1121
12 inline for (bit_values) |bits| {22 inline for (bit_values) |bits| {
13 try testBitCast(bits);23 try testBitCast(bits);