4c6f1e614a
init-lib creates a working static library with tests, and init-exe creates a working hello world with a `run` target. both now have test coverage with the new "cli tests" file. closes #1035
11 lines
204 B
Zig
11 lines
204 B
Zig
const std = @import("std");
|
|
const assertOrPanic = std.debug.assertOrPanic;
|
|
|
|
export fn add(a: i32, b: i32) i32 {
|
|
return a + b;
|
|
}
|
|
|
|
test "basic add functionality" {
|
|
assertOrPanic(add(3, 7) == 10);
|
|
}
|