diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-01-15 22:59:33 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-15 22:59:33 -0800 |
| commit | ca8c6dd4d65abaadaf0633f4a72e5c0ed79b3c53 (patch) | |
| tree | fdc360285a385f966f16fb5530d6e8a5e3fda58f /test/behavior/struct.zig | |
| parent | fcc94f54317f12fadffb7822cb4478f49e4045a1 (diff) | |
| parent | a219c9faaa7622910d3472853ab648581174aeb4 (diff) | |
| download | zig-ca8c6dd4d65abaadaf0633f4a72e5c0ed79b3c53.tar.gz zig-ca8c6dd4d65abaadaf0633f4a72e5c0ed79b3c53.zip | |
Merge pull request #18569 from dweiller/17944-followup
17944 followup
Diffstat (limited to 'test/behavior/struct.zig')
| -rw-r--r-- | test/behavior/struct.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/behavior/struct.zig b/test/behavior/struct.zig index d03e4ebf32..c74d6344dd 100644 --- a/test/behavior/struct.zig +++ b/test/behavior/struct.zig @@ -591,7 +591,7 @@ test "bit field access" { try expect(getA(&data) == 1); try expect(getB(&data) == 2); try expect(getC(&data) == 3); - try comptime expect(@sizeOf(BitField1) == 1); + comptime assert(@sizeOf(BitField1) == 1); data.b += 1; try expect(data.b == 3); @@ -730,7 +730,7 @@ test "packed struct with u0 field access" { }; var s = S{ .f0 = 0 }; _ = &s; - try comptime expect(s.f0 == 0); + comptime assert(s.f0 == 0); } test "access to global struct fields" { @@ -947,7 +947,7 @@ test "comptime struct field" { var foo: T = undefined; _ = &foo; - try comptime expect(foo.b == 1234); + comptime assert(foo.b == 1234); } test "tuple element initialized with fn call" { |
