mirror of
https://github.com/ziglang/zig.git
synced 2026-01-13 19:05:12 +00:00
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
11 lines
233 B
Zig
11 lines
233 B
Zig
const expect = @import("std").testing.expect;
|
|
|
|
const ptr = &global;
|
|
var global: u64 = 123;
|
|
|
|
test "constant pointer to global variable causes runtime load" {
|
|
global = 1234;
|
|
expect(&global == ptr);
|
|
expect(ptr.* == 1234);
|
|
}
|