zig/std/special/init-lib/src/main.zig
Andrew Kelley 4c6f1e614a
remove zig build --init. add zig init-lib and zig init-exe
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
2018-09-17 17:11:18 -04:00

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);
}