mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
15 lines
423 B
Zig
15 lines
423 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
test "namespace depends on compile var" {
|
|
if (some_namespace.a_bool) {
|
|
expect(some_namespace.a_bool);
|
|
} else {
|
|
expect(!some_namespace.a_bool);
|
|
}
|
|
}
|
|
const some_namespace = switch (std.builtin.os.tag) {
|
|
.linux => @import("namespace_depends_on_compile_var/a.zig"),
|
|
else => @import("namespace_depends_on_compile_var/b.zig"),
|
|
};
|