mirror of
https://github.com/ziglang/zig.git
synced 2026-01-10 17:35:12 +00:00
tests: work around miscompilation
This commit is contained in:
parent
08b6baca12
commit
7437c47d55
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user