aboutsummaryrefslogtreecommitdiff
path: root/test/link/static_libs_from_object_files/main.zig
blob: c0f577e7df3a307e1afc66882904384c955a439e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const std = @import("std");

extern fn foo_last() i32;
extern fn bar_last() i32;

export const one_0: i32 = 1;

export fn foo_0() i32 {
    return 1234;
}
export fn bar_0() i32 {
    return 5678;
}

pub fn main() anyerror!void {
    const foo_expected: i32 = 1 + 1234;
    const bar_expected: i32 = 5678;
    try std.testing.expectEqual(foo_expected, foo_last());
    try std.testing.expectEqual(bar_expected, bar_last());
}