diff options
| author | dweiller <4678790+dweiller@users.noreply.github.com> | 2024-01-15 16:01:13 +1100 |
|---|---|---|
| committer | dweiller <4678790+dweiller@users.noreply.github.com> | 2024-01-15 20:55:01 +1100 |
| commit | 8108c9f4d2580680e3ed2fc6a289b1af1c939b5c (patch) | |
| tree | a1be69b29e073349218b1937c742e82e6790748c /test/behavior/array.zig | |
| parent | 1861423862194e845c631d0e0eea5c7bca5d284b (diff) | |
| download | zig-8108c9f4d2580680e3ed2fc6a289b1af1c939b5c.tar.gz zig-8108c9f4d2580680e3ed2fc6a289b1af1c939b5c.zip | |
test/behavior: replace all 'comptime expect' with 'comptime assert'
Diffstat (limited to 'test/behavior/array.zig')
| -rw-r--r-- | test/behavior/array.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/behavior/array.zig b/test/behavior/array.zig index 8204453de6..75141c6bd1 100644 --- a/test/behavior/array.zig +++ b/test/behavior/array.zig @@ -2,6 +2,7 @@ const std = @import("std"); const builtin = @import("builtin"); const testing = std.testing; const mem = std.mem; +const assert = std.debug.assert; const expect = testing.expect; const expectEqual = testing.expectEqual; @@ -149,9 +150,9 @@ test "array len field" { var arr = [4]u8{ 0, 0, 0, 0 }; const ptr = &arr; try expect(arr.len == 4); - try comptime expect(arr.len == 4); + comptime assert(arr.len == 4); try expect(ptr.len == 4); - try comptime expect(ptr.len == 4); + comptime assert(ptr.len == 4); try expect(@TypeOf(arr.len) == usize); } @@ -904,7 +905,7 @@ test "store array of array of structs at comptime" { }; try expect(S.storeArrayOfArrayOfStructs() == 15); - try comptime expect(S.storeArrayOfArrayOfStructs() == 15); + comptime assert(S.storeArrayOfArrayOfStructs() == 15); } test "accessing multidimensional global array at comptime" { |
