aboutsummaryrefslogtreecommitdiff
path: root/test/tests.zig
diff options
context:
space:
mode:
authorChris Boesch <[email protected]>2024-04-02 22:19:17 +0000
committerChris Boesch <[email protected]>2024-04-02 22:19:17 +0000
commitc0ff1b70c152603bc5680abfb1793b176125d7c8 (patch)
tree450915190c83df13d68442813b5800dfa43675c8 /test/tests.zig
parentba4709b20f5d1ad1e1962db41d59b5e7f7c03fea (diff)
parentf06c1f27d13b3ec380049ef58e5e8eee566172ac (diff)
downloadziglings-c0ff1b70c152603bc5680abfb1793b176125d7c8.tar.xz
ziglings-c0ff1b70c152603bc5680abfb1793b176125d7c8.zip
Merge pull request 'WIP - fix breaking zig change to @fieldParentPtr' (#72) from kamidev/exercises:fix_zig_breaking_pr_19470 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/72
Diffstat (limited to 'test/tests.zig')
-rw-r--r--test/tests.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tests.zig b/test/tests.zig
index 9ab15b3..5ee5365 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -152,7 +152,7 @@ const CheckNamedStep = struct {
fn make(step: *Step, _: *std.Progress.Node) !void {
const b = step.owner;
- const self = @fieldParentPtr(CheckNamedStep, "step", step);
+ const self: *CheckNamedStep = @alignCast(@fieldParentPtr("step", step));
const ex = self.exercise;
const stderr_file = try fs.cwd().openFile(
@@ -204,7 +204,7 @@ const CheckStep = struct {
fn make(step: *Step, _: *std.Progress.Node) !void {
const b = step.owner;
- const self = @fieldParentPtr(CheckStep, "step", step);
+ const self: *CheckStep = @alignCast(@fieldParentPtr("step", step));
const exercises = self.exercises;
const stderr_file = try fs.cwd().openFile(
@@ -327,7 +327,7 @@ const FailStep = struct {
fn make(step: *Step, _: *std.Progress.Node) !void {
const b = step.owner;
- const self = @fieldParentPtr(FailStep, "step", step);
+ const self: *FailStep = @alignCast(@fieldParentPtr("step", step));
try step.result_error_msgs.append(b.allocator, self.error_msg);
return error.MakeFailed;
@@ -370,7 +370,7 @@ const HealStep = struct {
fn make(step: *Step, _: *std.Progress.Node) !void {
const b = step.owner;
- const self = @fieldParentPtr(HealStep, "step", step);
+ const self: *HealStep = @alignCast(@fieldParentPtr("step", step));
return heal(b.allocator, self.exercises, self.work_path);
}