diff --git a/test/stage1/behavior/pointers.zig b/test/stage1/behavior/pointers.zig index 50b36fe583..bf292bad0d 100644 --- a/test/stage1/behavior/pointers.zig +++ b/test/stage1/behavior/pointers.zig @@ -132,8 +132,8 @@ test "initialize const optional C pointer to null" { } test "compare equality of optional and non-optional pointer" { - const a = @intToPtr(*const usize, 0x123456789); - const b = @intToPtr(?*usize, 0x123456789); + const a = @intToPtr(*const usize, 0x12345678); + const b = @intToPtr(?*usize, 0x12345678); expect(a == b); expect(b == a); } diff --git a/test/stage1/behavior/struct.zig b/test/stage1/behavior/struct.zig index 114f06982b..ec404213f0 100644 --- a/test/stage1/behavior/struct.zig +++ b/test/stage1/behavior/struct.zig @@ -2,7 +2,7 @@ const std = @import("std"); const expect = std.testing.expect; const expectEqualSlices = std.testing.expectEqualSlices; const builtin = @import("builtin"); -const maxInt = std.math.maxInt; +const maxInt = std.math.maxInt; const StructWithNoFields = struct { fn add(a: i32, b: i32) i32 { return a + b; @@ -256,7 +256,11 @@ const Foo96Bits = packed struct { test "packed struct 24bits" { comptime { expect(@sizeOf(Foo24Bits) == 4); - expect(@sizeOf(Foo96Bits) == 16); + if (@sizeOf(usize) == 4) { + expect(@sizeOf(Foo96Bits) == 12); + } else { + expect(@sizeOf(Foo96Bits) == 16); + } } var value = Foo96Bits{ @@ -505,10 +509,10 @@ test "packed struct with u0 field access" { comptime expect(s.f0 == 0); } -const S0 = struct{ +const S0 = struct { bar: S1, - pub const S1 = struct{ + pub const S1 = struct { value: u8, };