| 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); |
| 3 | const expect = std.testing.expect; |
| 4 | const expectEqual = std.testing.expectEqual; |
| 5 | const a_namespace = @import("import/a_namespace.zig"); |
| 6 | |
| 7 | test "call fn via namespace lookup" { |
| 8 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 9 | |
| 10 | try expect(@as(i32, 1234) == a_namespace.foo()); |
| 11 | } |
| 12 | |
| 13 | test "importing the same thing gives the same import" { |
| 14 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 15 | |
| 16 | try expect(@import("std") == @import("std")); |
| 17 | } |
| 18 | |
| 19 | test "import empty file" { |
| 20 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 21 | |
| 22 | _ = @import("import/empty.zig"); |
| 23 | } |