Commit 0771aac48b

Alex Cameron <ascottcameron@gmail.com>
2020-11-23 13:57:18
Don't use emit-h in test cases for other backends.
1 parent e834d03
Changed files (1)
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,