diff options
author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-05-03 18:17:21 +0200 |
---|---|---|
committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-05-03 18:17:21 +0200 |
commit | 193bee7d2dc4a04fc08d99ed66849a36695ecfb6 (patch) | |
tree | dbe5367df9d7a846eaaf7fe7f57b334019ecf584 /exercises/102_testing.zig | |
parent | 72a6287a5f1784b6da091c1ef1cc3cb3c1153d05 (diff) |
Added new flag 'run_test' to support test steps for test exercises.
Also created a simple exercise '102_testing' to test the new flag.
After the new build system is ready, we skip the exercise in the flow to finish the actual testing exercise.
Diffstat (limited to 'exercises/102_testing.zig')
-rw-r--r-- | exercises/102_testing.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/exercises/102_testing.zig b/exercises/102_testing.zig new file mode 100644 index 0000000..dc1da59 --- /dev/null +++ b/exercises/102_testing.zig @@ -0,0 +1,10 @@ +const std = @import("std"); +const testing = std.testing; + +fn add(a: u16, b: u16) u16 { + return a + b; +} + +test "simple test" { + try testing.expect(add(41, 1) == 42); +} |