mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
10 lines
183 B
Zig
10 lines
183 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
extern fn sub(a: i32, b: i32) i32;
|
|
|
|
test "import C sub" {
|
|
const result = sub(2, 1);
|
|
try expect(result == 1);
|
|
}
|