From 7437c47d55da4c73aba26327d1a140aaf6591d4a Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Sat, 8 May 2021 15:11:06 +0300 Subject: [PATCH] tests: work around miscompilation --- test/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 index cf90936bdb..85bc3b04bc 100644 --- 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); } };