zig/test/cases/import.zig

11 lines
284 B
Zig
Raw Normal View History

2017-01-05 16:57:48 +08:00
const assert = @import("std").debug.assert;
const a_namespace = @import("import/a_namespace.zig");
2017-09-10 10:53:32 +08:00
test "call fn via namespace lookup" {
assert(a_namespace.foo() == 1234);
}
2017-09-10 10:54:50 +08:00
test "importing the same thing gives the same import" {
assert(@import("std") == @import("std"));
}