skip calculating struct sizes on 32 bit platforms

This commit is contained in:
Igor Anić 2024-02-14 19:58:45 +01:00
parent c2361bf548
commit d49cdf5b2d
2 changed files with 4 additions and 0 deletions

View File

@ -603,6 +603,8 @@ const TestTokenWriter = struct {
};
test "flate.Deflate struct sizes" {
if (@sizeOf(usize) != 8) return error.SkipZigTest;
try expect(@sizeOf(Token) == 4);
// list: (1 << 15) * 4 = 128k + pos: 8

View File

@ -342,6 +342,8 @@ pub fn Inflate(comptime container: Container, comptime ReaderType: type) type {
}
test "flate.Inflate struct sizes" {
if (@sizeOf(usize) != 8) return error.SkipZigTest;
var fbs = std.io.fixedBufferStream("");
const ReaderType = @TypeOf(fbs.reader());
const inflate_size = @sizeOf(Inflate(.gzip, ReaderType));