mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 19:23:08 +00:00
This test was always really testing correct behavior of our in-house MachO linker to begin with.
16 lines
267 B
Zig
16 lines
267 B
Zig
const std = @import("std");
|
|
|
|
extern threadlocal var a: i32;
|
|
extern fn getA() i32;
|
|
|
|
fn getA2() i32 {
|
|
return a;
|
|
}
|
|
|
|
test {
|
|
a = 2;
|
|
try std.testing.expect(getA() == 2);
|
|
try std.testing.expect(2 == getA2());
|
|
try std.testing.expect(getA() == getA2());
|
|
}
|