diff options
| author | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-05 14:29:28 +0600 |
|---|---|---|
| committer | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-13 23:46:58 +0600 |
| commit | d884d7050e061c620324aaaabfba507e08cb40f4 (patch) | |
| tree | fa0b5994341509ef81d7244788ea3e37b13f6d27 /test/behavior/align.zig | |
| parent | 6078781ae52fc2c85559f622f58c303b73d8a6a5 (diff) | |
| download | zig-d884d7050e061c620324aaaabfba507e08cb40f4.tar.gz zig-d884d7050e061c620324aaaabfba507e08cb40f4.zip | |
all: replace `comptime try` with `try comptime`
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'test/behavior/align.zig')
| -rw-r--r-- | test/behavior/align.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/behavior/align.zig b/test/behavior/align.zig index ce407422bf..4ce408e65d 100644 --- a/test/behavior/align.zig +++ b/test/behavior/align.zig @@ -7,11 +7,11 @@ const assert = std.debug.assert; var foo: u8 align(4) = 100; test "global variable alignment" { - comptime try expect(@typeInfo(@TypeOf(&foo)).Pointer.alignment == 4); - comptime try expect(@TypeOf(&foo) == *align(4) u8); + try comptime expect(@typeInfo(@TypeOf(&foo)).Pointer.alignment == 4); + try comptime expect(@TypeOf(&foo) == *align(4) u8); { const slice = @as(*align(4) [1]u8, &foo)[0..]; - comptime try expect(@TypeOf(slice) == *align(4) [1]u8); + try comptime expect(@TypeOf(slice) == *align(4) [1]u8); } } @@ -396,7 +396,7 @@ test "function align expression depends on generic parameter" { } }; try S.doTheTest(); - comptime try S.doTheTest(); + try comptime S.doTheTest(); } test "function callconv expression depends on generic parameter" { @@ -414,7 +414,7 @@ test "function callconv expression depends on generic parameter" { } }; try S.doTheTest(); - comptime try S.doTheTest(); + try comptime S.doTheTest(); } test "runtime-known array index has best alignment possible" { @@ -452,10 +452,10 @@ test "runtime-known array index has best alignment possible" { try testIndex2(&array, 3, *u8); } fn testIndex(smaller: [*]align(2) u32, index: usize, comptime T: type) !void { - comptime try expect(@TypeOf(&smaller[index]) == T); + try comptime expect(@TypeOf(&smaller[index]) == T); } fn testIndex2(ptr: [*]align(4) u8, index: usize, comptime T: type) !void { - comptime try expect(@TypeOf(&ptr[index]) == T); + try comptime expect(@TypeOf(&ptr[index]) == T); } test "alignment of function with c calling convention" { @@ -517,7 +517,7 @@ test "struct field explicit alignment" { var node: S.Node = undefined; node.massive_byte = 100; try expect(node.massive_byte == 100); - comptime try expect(@TypeOf(&node.massive_byte) == *align(64) u8); + try comptime expect(@TypeOf(&node.massive_byte) == *align(64) u8); try expect(@ptrToInt(&node.massive_byte) % 64 == 0); } |
