authorgravatar for paul.verigo@gmail.comPavel Verigo <paul.verigo@gmail.com> 2026-05-03 19:03:46+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-04 07:40:02+02:00
log3d1fb4fac8d4ce47d6e306b33def16ab49445190
tree8487e3a105cb5d3fba7d1ab198aa64d1b3b80af9
parenta794287573a84f04f675efeb3278ebc00755a57b

stage2-wasm: disable std tests, add failing behavior tests


3 files changed, 51 insertions(+), 1 deletions(-)

test/behavior/bitcast.zig+39
......@@ -552,3 +552,42 @@ test "@bitCast of extern struct containing pointer" {
552552 try S.doTheTest();
553553 try comptime S.doTheTest();
554554}
555
556test "@bitCast of extern struct to float" {
557 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
558
559 const S = struct {
560 const S = extern struct {
561 x: u16,
562 y: u16,
563 };
564 fn doTheTest() !void {
565 var s: S = .{ .x = 0, .y = 0 };
566 _ = &s;
567 const a: f32 = @bitCast(s);
568 try expect(a == 0);
569 }
570 };
571
572 try S.doTheTest();
573 try comptime S.doTheTest();
574}
575
576test "@bitCast of float to extern struct" {
577 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
578
579 const S = struct {
580 const S = extern struct {
581 x: u32,
582 };
583 fn doTheTest() !void {
584 var a: f32 = -0.0;
585 _ = &a;
586 const s: S = @bitCast(a);
587 try expect(s.x == 0x80000000);
588 }
589 };
590
591 try S.doTheTest();
592 try comptime S.doTheTest();
593}
test/behavior/floatop.zig+11
......@@ -1539,6 +1539,17 @@ fn testNeg(comptime T: type) !void {
15391539 };
15401540}
15411541
1542test "negate f80" {
1543 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
1544
1545 var f: f80 = 0.0;
1546 const a: u80 = @bitCast(f);
1547 try expect(a == 0);
1548 f = -f;
1549 const b: u80 = @bitCast(f);
1550 try expect(b == 0x8000_00000000_00000000);
1551}
1552
15421553test "eval @setFloatMode at compile-time" {
15431554 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
15441555
test/tests.zig+1-1
......@@ -1496,7 +1496,7 @@ const module_test_targets = blk: {
14961496 .os_tag = .wasi,
14971497 .abi = .none,
14981498 },
1499 .skip_modules = &.{"compiler-rt"},
1499 .skip_modules = &.{ "compiler-rt", "std" },
15001500 .use_llvm = false,
15011501 .use_lld = false,
15021502 },