master
1const std = @import("std");
2const expect = std.testing.expect;
3
4extern fn common_defined_externally() c_int;
5extern fn incr_i() void;
6extern fn add_to_i_and_j(x: c_int) c_int;
7
8test "undef shadows common symbol: issue #9937" {
9 try expect(common_defined_externally() == 0);
10}
11
12test "import C common symbols" {
13 incr_i();
14 const res = add_to_i_and_j(2);
15 try expect(res == 5);
16}