aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 3d86ece..916f1a7 100644
--- a/build.zig
+++ b/build.zig
@@ -236,6 +236,14 @@ const exercises = [_]Exercise{
.output = "Elephant A. Elephant B. Elephant C.",
.hint = "Oh no! We forgot Elephant B!",
},
+ .{
+ .main_file = "45_optionals.zig",
+ .output = "The Ultimate Answer: 42.",
+ },
+ // optional fields (elephant tail - no longer need circular)
+ // super-simple struct method
+ // use struct method for elephant tails
+ // quiz: add elephant trunk (like tail)!
};
/// Check the zig version to make sure it can compile the examples properly.
@@ -463,7 +471,7 @@ const ZiglingStep = struct {
return error.InvalidOutput;
}
- print("{s}** PASSED **{s}\n", .{ green_text, reset_text });
+ print("{s}{s}{s}\n", .{ green_text, output, reset_text });
}
// The normal compile step calls os.exit, so we can't use it as a library :(