From 38d2c5cdf1bc4b9a890a8da80baef32db5e2eb23 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sat, 27 Jun 2020 21:39:04 -0400 Subject: [PATCH] Rename type -> extension --- src-self-hosted/test.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig index 398d988eeb..38392b8aa7 100644 --- a/src-self-hosted/test.zig +++ b/src-self-hosted/test.zig @@ -67,7 +67,7 @@ pub const TestContext = struct { /// to Executable. output_mode: std.builtin.OutputMode, updates: std.ArrayList(Update), - @"type": TestType, + extension: TestType, /// Adds a subcase in which the module is updated with `src`, and the /// resulting ZIR is validated against `result`. @@ -146,7 +146,7 @@ pub const TestContext = struct { .target = target, .updates = std.ArrayList(Update).init(ctx.cases.allocator), .output_mode = .Exe, - .@"type" = T, + .extension = T, }) catch unreachable; return &ctx.cases.items[ctx.cases.items.len - 1]; } @@ -172,7 +172,7 @@ pub const TestContext = struct { .target = target, .updates = std.ArrayList(Update).init(ctx.cases.allocator), .output_mode = .Obj, - .@"type" = T, + .extension = T, }) catch unreachable; return &ctx.cases.items[ctx.cases.items.len - 1]; } @@ -406,7 +406,7 @@ pub const TestContext = struct { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - const tmp_src_path = if (case.type == .Zig) "test_case.zig" else if (case.type == .ZIR) "test_case.zir" else unreachable; + const tmp_src_path = if (case.extension == .Zig) "test_case.zig" else if (case.extension == .ZIR) "test_case.zir" else unreachable; const root_pkg = try Package.create(allocator, tmp.dir, ".", tmp_src_path); defer root_pkg.destroy();