aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/tests.zig
diff options
context:
space:
mode:
authorManlio Perillo <manlio.perillo@gmail.com>2023-05-04 18:48:35 +0200
committerManlio Perillo <manlio.perillo@gmail.com>2023-05-04 18:48:35 +0200
commit277c95db7af09732f5179677fcbd191e36fefc81 (patch)
treee2714c52c82918cb5f389f54f499c9274f54057b /test/tests.zig
parent5c488a1402be83f198cc29f23f448313001a9a1c (diff)
test: fix doc-comments
CheckStep, FailStep, fail, HealStep and heal incorrectly used a normal comment, instead of a doc-comment. Additionally, improve the documentation for FailStep and HealStep.
Diffstat (limited to 'test/tests.zig')
-rw-r--r--test/tests.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/tests.zig b/test/tests.zig
index 060b553..dbf237b 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -158,7 +158,7 @@ fn createCase(b: *Build, name: []const u8) *Step {
return case_step;
}
-// Check the output of `zig build` or `zig build -Dn=1 start`.
+/// Checks the output of `zig build` or `zig build -Dn=1 start`.
const CheckStep = struct {
step: Step,
exercises: []const Exercise,
@@ -282,7 +282,7 @@ const CheckStep = struct {
}
};
-// A step that will fail.
+/// Fails with a custom error message.
const FailStep = struct {
step: Step,
error_msg: []const u8,
@@ -311,9 +311,9 @@ const FailStep = struct {
}
};
-// A variant of `std.Build.Step.fail` that does not return an error so that it
-// can be used in the configuration phase. It returns a FailStep, so that the
-// error will be cleanly handled by the build runner.
+/// A variant of `std.Build.Step.fail` that does not return an error so that it
+/// can be used in the configuration phase. It returns a FailStep, so that the
+/// error will be cleanly handled by the build runner.
fn fail(step: *Step, comptime format: []const u8, args: anytype) *Step {
const b = step.owner;
@@ -323,7 +323,7 @@ fn fail(step: *Step, comptime format: []const u8, args: anytype) *Step {
return step;
}
-// A step that heals exercises.
+/// Heals the exercises.
const HealStep = struct {
step: Step,
exercises: []const Exercise,
@@ -353,7 +353,7 @@ const HealStep = struct {
}
};
-// Heals all the exercises.
+/// Heals all the exercises.
fn heal(allocator: Allocator, exercises: []const Exercise, work_path: []const u8) !void {
const join = fs.path.join;