From 0771aac48b2e9acde348db9985c270abad329e39 Mon Sep 17 00:00:00 2001 From: Alex Cameron Date: Mon, 23 Nov 2020 23:57:18 +1100 Subject: [PATCH] Don't use emit-h in test cases for other backends. --- src/test.zig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/test.zig b/src/test.zig index aafd469585..6deee347af 100644 --- 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,