mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-09 16:39:58 +00:00
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.
This commit is contained in:
10
exercises/102_testing.zig
Normal file
10
exercises/102_testing.zig
Normal file
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user