| author | |
| committer | |
| log | ab1946de924c7fe107299042c5312fa31f34b93e |
| tree | cce9b35e4f5006a681cb6fa2ab7ac20878979a9f |
| parent | 4dba253cd2b22811c414aa0c183cf371bd111a57 |
| signature |
1 files changed, 3 insertions(+), 2 deletions(-)
test/link/interdependent_static_c_libs/main.zig+3-2| ... | @@ -1,8 +1,9 @@ | ... | @@ -1,8 +1,9 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const expect = std.testing.expect; | 2 | const expect = std.testing.expect; |
| 3 | const c = @cImport(@cInclude("b.h")); | 3 | |
| 4 | extern fn sub(a: i32, b: i32) i32; | ||
| 4 | 5 | ||
| 5 | test "import C sub" { | 6 | test "import C sub" { |
| 6 | const result = c.sub(2, 1); | 7 | const result = sub(2, 1); |
| 7 | try expect(result == 1); | 8 | try expect(result == 1); |
| 8 | } | 9 | } |