mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
test: remove @cImport usage in interdependent_static_c_libs
This commit is contained in:
parent
4dba253cd2
commit
ab1946de92
@ -1,8 +1,9 @@
|
||||
const std = @import("std");
|
||||
const expect = std.testing.expect;
|
||||
const c = @cImport(@cInclude("b.h"));
|
||||
|
||||
extern fn sub(a: i32, b: i32) i32;
|
||||
|
||||
test "import C sub" {
|
||||
const result = c.sub(2, 1);
|
||||
const result = sub(2, 1);
|
||||
try expect(result == 1);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user