Skip to content

Commit 7437c47

Browse files
committed
tests: work around miscompilation
1 parent 08b6bac commit 7437c47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/stage1/behavior/struct.zig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,9 +933,10 @@ test "packed struct with undefined initializers" {
933933
var p: P = undefined;
934934
p = P{ .a = 2, .b = 4, .c = 6 };
935935
// Make sure the compiler doesn't touch the unprefixed fields.
936-
try expectEqual(@as(u3, 2), p.a);
937-
try expectEqual(@as(u3, 4), p.b);
938-
try expectEqual(@as(u3, 6), p.c);
936+
// Use expect since i386-linux doesn't like expectEqual
937+
try expect(p.a == 2);
938+
try expect(p.b == 4);
939+
try expect(p.c == 6);
939940
}
940941
};
941942

0 commit comments

Comments
 (0)