authorgravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2024-02-14 19:58:45+01:00
committergravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2024-02-14 19:58:45+01:00
logd49cdf5b2d2e30ab9188c54e359f19768d890bf3
tree6cb3af9da093f63bd524d21ca88c06807399d687
parentc2361bf54808da49393e892b81bdff45c68c4c51

skip calculating struct sizes on 32 bit platforms


2 files changed, 4 insertions(+), 0 deletions(-)

lib/std/compress/flate/deflate.zig+2
...@@ -603,6 +603,8 @@ const TestTokenWriter = struct {...@@ -603,6 +603,8 @@ const TestTokenWriter = struct {
603};603};
604604
605test "flate.Deflate struct sizes" {605test "flate.Deflate struct sizes" {
606 if (@sizeOf(usize) != 8) return error.SkipZigTest;
607
606 try expect(@sizeOf(Token) == 4);608 try expect(@sizeOf(Token) == 4);
607609
608 // list: (1 << 15) * 4 = 128k + pos: 8610 // list: (1 << 15) * 4 = 128k + pos: 8
lib/std/compress/flate/inflate.zig+2
...@@ -342,6 +342,8 @@ pub fn Inflate(comptime container: Container, comptime ReaderType: type) type {...@@ -342,6 +342,8 @@ pub fn Inflate(comptime container: Container, comptime ReaderType: type) type {
342}342}
343343
344test "flate.Inflate struct sizes" {344test "flate.Inflate struct sizes" {
345 if (@sizeOf(usize) != 8) return error.SkipZigTest;
346
345 var fbs = std.io.fixedBufferStream("");347 var fbs = std.io.fixedBufferStream("");
346 const ReaderType = @TypeOf(fbs.reader());348 const ReaderType = @TypeOf(fbs.reader());
347 const inflate_size = @sizeOf(Inflate(.gzip, ReaderType));349 const inflate_size = @sizeOf(Inflate(.gzip, ReaderType));