authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-06-27 21:39:04-04:00
committergravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-06-27 21:39:04-04:00
log38d2c5cdf1bc4b9a890a8da80baef32db5e2eb23
treede16a2e144ce7e0d804dcf41bf4eae4b94fb2700
parent1861c25142650c71a99e259367ae2fd9ea601c1b
signature Commit is signed but in an unrecognized format.

Rename type -> extension


1 files changed, 4 insertions(+), 4 deletions(-)

src-self-hosted/test.zig+4-4
......@@ -67,7 +67,7 @@ pub const TestContext = struct {
6767 /// to Executable.
6868 output_mode: std.builtin.OutputMode,
6969 updates: std.ArrayList(Update),
70 @"type": TestType,
70 extension: TestType,
7171
7272 /// Adds a subcase in which the module is updated with `src`, and the
7373 /// resulting ZIR is validated against `result`.
......@@ -146,7 +146,7 @@ pub const TestContext = struct {
146146 .target = target,
147147 .updates = std.ArrayList(Update).init(ctx.cases.allocator),
148148 .output_mode = .Exe,
149 .@"type" = T,
149 .extension = T,
150150 }) catch unreachable;
151151 return &ctx.cases.items[ctx.cases.items.len - 1];
152152 }
......@@ -172,7 +172,7 @@ pub const TestContext = struct {
172172 .target = target,
173173 .updates = std.ArrayList(Update).init(ctx.cases.allocator),
174174 .output_mode = .Obj,
175 .@"type" = T,
175 .extension = T,
176176 }) catch unreachable;
177177 return &ctx.cases.items[ctx.cases.items.len - 1];
178178 }
......@@ -406,7 +406,7 @@ pub const TestContext = struct {
406406 var tmp = std.testing.tmpDir(.{});
407407 defer tmp.cleanup();
408408
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;
410410 const root_pkg = try Package.create(allocator, tmp.dir, ".", tmp_src_path);
411411 defer root_pkg.destroy();
412412