commit 0771aac48b2e9acde348db9985c270abad329e39 (tree)
parent e834d0369a2339059284bcd9e695ae3ef25509fb
Author: Alex Cameron <ascottcameron@gmail.com>
Date: Mon, 23 Nov 2020 23:57:18 +1100
Don't use emit-h in test cases for other backends.
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/test.zig b/src/test.zig
@@ -564,10 +564,13 @@ pub const TestContext = struct {
.directory = emit_directory,
.basename = bin_name,
};
- const emit_h: Compilation.EmitLoc = .{
- .directory = emit_directory,
- .basename = "test_case.h",
- };
+ const emit_h: ?Compilation.EmitLoc = if (case.cbe)
+ .{
+ .directory = emit_directory,
+ .basename = "test_case.h",
+ }
+ else
+ null;
const comp = try Compilation.create(allocator, .{
.local_cache_directory = zig_cache_directory,
.global_cache_directory = zig_cache_directory,