zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 7437c47d55da4c73aba26327d1a140aaf6591d4a (tree)
parent 08b6baca122698db0d8543c8953d543f318c6422
Author: Veikka Tuominen <git@vexu.eu>
Date:   Sat,  8 May 2021 15:11:06 +0300

tests: work around miscompilation

Diffstat:
Mtest/stage1/behavior/struct.zig | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/stage1/behavior/struct.zig b/test/stage1/behavior/struct.zig @@ -933,9 +933,10 @@ test "packed struct with undefined initializers" { var p: P = undefined; p = P{ .a = 2, .b = 4, .c = 6 }; // Make sure the compiler doesn't touch the unprefixed fields. - try expectEqual(@as(u3, 2), p.a); - try expectEqual(@as(u3, 4), p.b); - try expectEqual(@as(u3, 6), p.c); + // Use expect since i386-linux doesn't like expectEqual + try expect(p.a == 2); + try expect(p.b == 4); + try expect(p.c == 6); } };