Commit d49cdf5b2d

Igor Anić <igor.anic@gmail.com>
2024-02-14 19:58:45
skip calculating struct sizes on 32 bit platforms
1 parent c2361bf
Changed files (2)
lib
std
compress
lib/std/compress/flate/deflate.zig
@@ -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
lib/std/compress/flate/inflate.zig
@@ -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));