From 8108c9f4d2580680e3ed2fc6a289b1af1c939b5c Mon Sep 17 00:00:00 2001 From: dweiller <4678790+dweiller@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:01:13 +1100 Subject: test/behavior: replace all 'comptime expect' with 'comptime assert' --- test/behavior/array.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/behavior/array.zig') 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" { -- cgit v1.2.3