From be43e2d010b65e0fb16f96cde3161d38fe535c31 Mon Sep 17 00:00:00 2001 From: Manlio Perillo Date: Sat, 6 May 2023 11:50:42 +0200 Subject: build: make `Exercise.hint` optional Use an optional type, instead of an empty string, since it is more idiomatic. --- test/tests.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/tests.zig') diff --git a/test/tests.zig b/test/tests.zig index 0fd3286..e00ece9 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -175,7 +175,7 @@ pub fn addCliTests(b: *std.Build, exercises: []const Exercise) *Step { const cmd = b.addSystemCommand(&.{ b.zig_exe, "build", "-Dn=1" }); cmd.setName("zig build -Dn=1"); cmd.expectExitCode(1); - expectStdErrMatch(cmd, exercises[0].hint); + expectStdErrMatch(cmd, exercises[0].hint orelse ""); cmd.step.dependOn(case_step); -- cgit v1.2.3