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