| ... | ... | @@ -44,9 +44,9 @@ fn addExpect( |
| 44 | 44 | for (mode_config.exclude_os) |tag| if (tag == builtin.os.tag) return; |
| 45 | 45 | |
| 46 | 46 | const b = self.b; |
| 47 | | const annotated_case_name = fmt.allocPrint(b.allocator, "check {s} ({s})", .{ |
| 47 | const annotated_case_name = b.fmt("check {s} ({s})", .{ |
| 48 | 48 | name, @tagName(optimize_mode), |
| 49 | | }) catch @panic("OOM"); |
| 49 | }); |
| 50 | 50 | for (self.test_filters) |test_filter| { |
| 51 | 51 | if (mem.indexOf(u8, annotated_case_name, test_filter)) |_| break; |
| 52 | 52 | } else if (self.test_filters.len > 0) return; |
| ... | ... | @@ -55,10 +55,12 @@ fn addExpect( |
| 55 | 55 | const source_zig = write_files.add("source.zig", source); |
| 56 | 56 | const exe = b.addExecutable(.{ |
| 57 | 57 | .name = "test", |
| 58 | | .root_source_file = source_zig, |
| 59 | | .optimize = optimize_mode, |
| 60 | | .target = b.graph.host, |
| 61 | | .error_tracing = mode_config.error_tracing, |
| 58 | .root_module = b.createModule(.{ |
| 59 | .root_source_file = source_zig, |
| 60 | .optimize = optimize_mode, |
| 61 | .target = b.graph.host, |
| 62 | .error_tracing = mode_config.error_tracing, |
| 63 | }), |
| 62 | 64 | }); |
| 63 | 65 | |
| 64 | 66 | const run = b.addRunArtifact(exe); |
| ... | ... | @@ -83,5 +85,4 @@ const std = @import("std"); |
| 83 | 85 | const builtin = @import("builtin"); |
| 84 | 86 | const Step = std.Build.Step; |
| 85 | 87 | const OptimizeMode = std.builtin.OptimizeMode; |
| 86 | | const fmt = std.fmt; |
| 87 | 88 | const mem = std.mem; |