| ... | ... | @@ -2522,10 +2522,6 @@ fn buildOutputType( |
| 2522 | 2522 | fatal("translate-c expects exactly 1 source file (found {d})", .{create_module.c_source_files.items.len}); |
| 2523 | 2523 | } |
| 2524 | 2524 | |
| 2525 | | if (root_src_file == null and arg_mode == .zig_test) { |
| 2526 | | fatal("`zig test` expects a zig source file argument", .{}); |
| 2527 | | } |
| 2528 | | |
| 2529 | 2525 | if (show_builtin and root_src_file == null) { |
| 2530 | 2526 | // Without this, there will be no main module created and no zig |
| 2531 | 2527 | // compilation unit, and therefore also no builtin.zig contents |
| ... | ... | @@ -2616,6 +2612,10 @@ fn buildOutputType( |
| 2616 | 2612 | rc_source_files_owner_index = create_module.rc_source_files.items.len; |
| 2617 | 2613 | } |
| 2618 | 2614 | |
| 2615 | if (!create_module.opts.have_zcu and arg_mode == .zig_test) { |
| 2616 | fatal("`zig test` expects a zig source file argument", .{}); |
| 2617 | } |
| 2618 | |
| 2619 | 2619 | if (c_source_files_owner_index != create_module.c_source_files.items.len) { |
| 2620 | 2620 | fatal("C source file '{s}' has no parent module", .{ |
| 2621 | 2621 | create_module.c_source_files.items[c_source_files_owner_index].src_path, |