mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
9 lines
183 B
Zig
9 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);
|
|
}
|