| author | |
| committer | |
| log | 8e1aa72c69cddc9fcd0bd8a3f9f4e9d3a8d002af |
| tree | 0461446d143ff1b67c7431f8d4d66965ca13e07c |
| parent | 526191bfafe722700323df30647eed0c03fc2403 |
| signature |
* added simple test
* Update lib/std/special/init-exe/build.zig
Co-authored-by: Andrew Kelley <andrew@ziglang.org>2 files changed, 10 insertions(+), 0 deletions(-)
lib/std/special/init-exe/build.zig+6| ... | ... | @@ -24,4 +24,10 @@ pub fn build(b: *std.build.Builder) void { |
| 24 | 24 | |
| 25 | 25 | const run_step = b.step("run", "Run the app"); |
| 26 | 26 | run_step.dependOn(&run_cmd.step); |
| 27 | ||
| 28 | var exe_tests = b.addTest("src/main.zig"); | |
| 29 | exe_tests.setBuildMode(mode); | |
| 30 | ||
| 31 | const test_step = b.step("test", "Run unit tests"); | |
| 32 | test_step.dependOn(&exe_tests.step); | |
| 27 | 33 | } |
lib/std/special/init-exe/src/main.zig+4| ... | ... | @@ -3,3 +3,7 @@ const std = @import("std"); |
| 3 | 3 | pub fn main() anyerror!void { |
| 4 | 4 | std.log.info("All your codebase are belong to us.", .{}); |
| 5 | 5 | } |
| 6 | ||
| 7 | test "basic test" { | |
| 8 | try std.testing.expectEqual(10, 3 + 7); | |
| 9 | } |