authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-16 16:31:03+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-16 23:39:29+02:00
logab1946de924c7fe107299042c5312fa31f34b93e
treecce9b35e4f5006a681cb6fa2ab7ac20878979a9f
parent4dba253cd2b22811c414aa0c183cf371bd111a57
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: remove @cImport usage in interdependent_static_c_libs


1 files changed, 3 insertions(+), 2 deletions(-)

  • foldertest
    • folderlink
test/link/interdependent_static_c_libs/main.zig+3-2
...@@ -1,8 +1,9 @@...@@ -1,8 +1,9 @@
1const std = @import("std");1const std = @import("std");
2const expect = std.testing.expect;2const expect = std.testing.expect;
3const c = @cImport(@cInclude("b.h"));3
4extern fn sub(a: i32, b: i32) i32;
45
5test "import C sub" {6test "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}