| ... | ... | @@ -67,7 +67,7 @@ pub const TestContext = struct { |
| 67 | 67 | /// to Executable. |
| 68 | 68 | output_mode: std.builtin.OutputMode, |
| 69 | 69 | updates: std.ArrayList(Update), |
| 70 | | @"type": TestType, |
| 70 | extension: TestType, |
| 71 | 71 | |
| 72 | 72 | /// Adds a subcase in which the module is updated with `src`, and the |
| 73 | 73 | /// resulting ZIR is validated against `result`. |
| ... | ... | @@ -146,7 +146,7 @@ pub const TestContext = struct { |
| 146 | 146 | .target = target, |
| 147 | 147 | .updates = std.ArrayList(Update).init(ctx.cases.allocator), |
| 148 | 148 | .output_mode = .Exe, |
| 149 | | .@"type" = T, |
| 149 | .extension = T, |
| 150 | 150 | }) catch unreachable; |
| 151 | 151 | return &ctx.cases.items[ctx.cases.items.len - 1]; |
| 152 | 152 | } |
| ... | ... | @@ -172,7 +172,7 @@ pub const TestContext = struct { |
| 172 | 172 | .target = target, |
| 173 | 173 | .updates = std.ArrayList(Update).init(ctx.cases.allocator), |
| 174 | 174 | .output_mode = .Obj, |
| 175 | | .@"type" = T, |
| 175 | .extension = T, |
| 176 | 176 | }) catch unreachable; |
| 177 | 177 | return &ctx.cases.items[ctx.cases.items.len - 1]; |
| 178 | 178 | } |
| ... | ... | @@ -406,7 +406,7 @@ pub const TestContext = struct { |
| 406 | 406 | var tmp = std.testing.tmpDir(.{}); |
| 407 | 407 | defer tmp.cleanup(); |
| 408 | 408 | |
| 409 | | const tmp_src_path = if (case.type == .Zig) "test_case.zig" else if (case.type == .ZIR) "test_case.zir" else unreachable; |
| 409 | const tmp_src_path = if (case.extension == .Zig) "test_case.zig" else if (case.extension == .ZIR) "test_case.zir" else unreachable; |
| 410 | 410 | const root_pkg = try Package.create(allocator, tmp.dir, ".", tmp_src_path); |
| 411 | 411 | defer root_pkg.destroy(); |
| 412 | 412 | |