| author | |
| committer | |
| log | d12f1f5b4954d893111c05420060354537a1485c |
| tree | 1026150a776607a5aae06273b3c3fa37ec47831f |
| parent | 9b7f438882b4f283d252d8ca364607fae385cc1a |
rename self hosted tests to behavior tests10 files changed, 137 insertions(+), 84 deletions(-)
build.zig+12-8| ... | ... | @@ -5,18 +5,20 @@ pub fn build(b: &Builder) { |
| 5 | 5 | const test_filter = b.option([]const u8, "test-filter", "Skip tests that do not match filter"); |
| 6 | 6 | const test_step = b.step("test", "Run all the tests"); |
| 7 | 7 | |
| 8 | const self_hosted_tests = b.step("test-self-hosted", "Run the self-hosted tests"); | |
| 9 | test_step.dependOn(self_hosted_tests); | |
| 8 | const behavior_tests = b.step("test-behavior", "Run the behavior tests"); | |
| 9 | test_step.dependOn(behavior_tests); | |
| 10 | 10 | for ([]bool{false, true}) |release| { |
| 11 | 11 | for ([]bool{false, true}) |link_libc| { |
| 12 | const these_tests = b.addTest("test/self_hosted.zig"); | |
| 13 | // TODO add prefix to test names | |
| 14 | // TODO pass test_filter to these_tests | |
| 12 | const these_tests = b.addTest("test/behavior.zig"); | |
| 13 | these_tests.setNamePrefix(b.fmt("behavior-{}-{} ", | |
| 14 | if (release) "release" else "debug", | |
| 15 | if (link_libc) "c" else "bare")); | |
| 16 | these_tests.setFilter(test_filter); | |
| 15 | 17 | these_tests.setRelease(release); |
| 16 | 18 | if (link_libc) { |
| 17 | 19 | these_tests.linkLibrary("c"); |
| 18 | 20 | } |
| 19 | self_hosted_tests.dependOn(&these_tests.step); | |
| 21 | behavior_tests.dependOn(&these_tests.step); | |
| 20 | 22 | } |
| 21 | 23 | } |
| 22 | 24 | |
| ... | ... | @@ -25,8 +27,10 @@ pub fn build(b: &Builder) { |
| 25 | 27 | for ([]bool{false, true}) |release| { |
| 26 | 28 | for ([]bool{false, true}) |link_libc| { |
| 27 | 29 | const these_tests = b.addTest("std/index.zig"); |
| 28 | // TODO add prefix to test names | |
| 29 | // TODO pass test_filter to these_tests | |
| 30 | these_tests.setNamePrefix(b.fmt("std-{}-{} ", | |
| 31 | if (release) "release" else "debug", | |
| 32 | if (link_libc) "c" else "bare")); | |
| 33 | these_tests.setFilter(test_filter); | |
| 30 | 34 | these_tests.setRelease(release); |
| 31 | 35 | if (link_libc) { |
| 32 | 36 | these_tests.linkLibrary("c"); |
src/all_types.hpp+3| ... | ... | @@ -1458,6 +1458,9 @@ struct CodeGen { |
| 1458 | 1458 | ZigList<Buf *> link_objects; |
| 1459 | 1459 | |
| 1460 | 1460 | ZigList<TypeTableEntry *> name_table_enums; |
| 1461 | ||
| 1462 | Buf *test_filter; | |
| 1463 | Buf *test_name_prefix; | |
| 1461 | 1464 | }; |
| 1462 | 1465 | |
| 1463 | 1466 | enum VarLinkage { |
src/analyze.cpp+8-1| ... | ... | @@ -1959,7 +1959,14 @@ static void preview_test_decl(CodeGen *g, AstNode *node, ScopeDecls *decls_scope |
| 1959 | 1959 | if (import->package != g->root_package) |
| 1960 | 1960 | return; |
| 1961 | 1961 | |
| 1962 | Buf *test_name = node->data.test_decl.name; | |
| 1962 | Buf *decl_name_buf = node->data.test_decl.name; | |
| 1963 | ||
| 1964 | Buf *test_name = g->test_name_prefix ? | |
| 1965 | buf_sprintf("%s%s", buf_ptr(g->test_name_prefix), buf_ptr(decl_name_buf)) : decl_name_buf; | |
| 1966 | ||
| 1967 | if (g->test_filter != nullptr && strstr(buf_ptr(test_name), buf_ptr(g->test_filter)) == nullptr) { | |
| 1968 | return; | |
| 1969 | } | |
| 1963 | 1970 | |
| 1964 | 1971 | TldFn *tld_fn = allocate<TldFn>(1); |
| 1965 | 1972 | init_tld(&tld_fn->base, TldIdFn, test_name, VisibModPrivate, node, &decls_scope->base); |
src/codegen.cpp+8| ... | ... | @@ -147,6 +147,14 @@ void codegen_set_omit_zigrt(CodeGen *g, bool omit_zigrt) { |
| 147 | 147 | g->omit_zigrt = omit_zigrt; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | void codegen_set_test_filter(CodeGen *g, Buf *filter) { | |
| 151 | g->test_filter = filter; | |
| 152 | } | |
| 153 | ||
| 154 | void codegen_set_test_name_prefix(CodeGen *g, Buf *prefix) { | |
| 155 | g->test_name_prefix = prefix; | |
| 156 | } | |
| 157 | ||
| 150 | 158 | void codegen_set_is_test(CodeGen *g, bool is_test_build) { |
| 151 | 159 | g->is_test_build = is_test_build; |
| 152 | 160 | } |
src/codegen.hpp+2| ... | ... | @@ -44,6 +44,8 @@ void codegen_set_mmacosx_version_min(CodeGen *g, Buf *mmacosx_version_min); |
| 44 | 44 | void codegen_set_mios_version_min(CodeGen *g, Buf *mios_version_min); |
| 45 | 45 | void codegen_set_linker_script(CodeGen *g, const char *linker_script); |
| 46 | 46 | void codegen_set_omit_zigrt(CodeGen *g, bool omit_zigrt); |
| 47 | void codegen_set_test_filter(CodeGen *g, Buf *filter); | |
| 48 | void codegen_set_test_name_prefix(CodeGen *g, Buf *prefix); | |
| 47 | 49 | |
| 48 | 50 | PackageTableEntry *new_package(const char *root_src_dir, const char *root_src_path); |
| 49 | 51 | void codegen_add_root_code(CodeGen *g, Buf *source_dir, Buf *source_basename, Buf *source_code); |
src/main.cpp+17| ... | ... | @@ -64,6 +64,9 @@ static int usage(const char *arg0) { |
| 64 | 64 | " -mwindows (windows only) --subsystem windows to the linker\n" |
| 65 | 65 | " -rdynamic add all symbols to the dynamic symbol table\n" |
| 66 | 66 | " -rpath [path] add directory to the runtime library search path\n" |
| 67 | "Test Options:\n" | |
| 68 | " --test-filter [text] skip tests that do not match filter\n" | |
| 69 | " --test-name-prefix [text] add prefix to all tests\n" | |
| 67 | 70 | , arg0); |
| 68 | 71 | return EXIT_FAILURE; |
| 69 | 72 | } |
| ... | ... | @@ -151,6 +154,8 @@ int main(int argc, char **argv) { |
| 151 | 154 | ZigList<const char *> rpath_list = {0}; |
| 152 | 155 | bool each_lib_rpath = false; |
| 153 | 156 | ZigList<const char *> objects = {0}; |
| 157 | const char *test_filter = nullptr; | |
| 158 | const char *test_name_prefix = nullptr; | |
| 154 | 159 | |
| 155 | 160 | if (argc >= 2 && strcmp(argv[1], "build") == 0) { |
| 156 | 161 | const char *zig_exe_path = arg0; |
| ... | ... | @@ -341,6 +346,10 @@ int main(int argc, char **argv) { |
| 341 | 346 | linker_script = argv[i]; |
| 342 | 347 | } else if (strcmp(arg, "-rpath") == 0) { |
| 343 | 348 | rpath_list.append(argv[i]); |
| 349 | } else if (strcmp(arg, "--test-filter") == 0) { | |
| 350 | test_filter = argv[i]; | |
| 351 | } else if (strcmp(arg, "--test-name-prefix") == 0) { | |
| 352 | test_name_prefix = argv[i]; | |
| 344 | 353 | } else { |
| 345 | 354 | fprintf(stderr, "Invalid argument: %s\n", arg); |
| 346 | 355 | return usage(arg0); |
| ... | ... | @@ -562,6 +571,14 @@ int main(int argc, char **argv) { |
| 562 | 571 | codegen_set_mios_version_min(g, buf_create_from_str(mios_version_min)); |
| 563 | 572 | } |
| 564 | 573 | |
| 574 | if (test_filter) { | |
| 575 | codegen_set_test_filter(g, buf_create_from_str(test_filter)); | |
| 576 | } | |
| 577 | ||
| 578 | if (test_name_prefix) { | |
| 579 | codegen_set_test_name_prefix(g, buf_create_from_str(test_name_prefix)); | |
| 580 | } | |
| 581 | ||
| 565 | 582 | if (cmd == CmdBuild) { |
| 566 | 583 | codegen_add_root_code(g, &root_source_dir, &root_source_name, &root_source_code); |
| 567 | 584 | codegen_link(g, out_file); |
std/build.zig+46-34| ... | ... | @@ -10,7 +10,7 @@ const StdIo = os.ChildProcess.StdIo; |
| 10 | 10 | const Term = os.ChildProcess.Term; |
| 11 | 11 | const BufSet = @import("buf_set.zig").BufSet; |
| 12 | 12 | const BufMap = @import("buf_map.zig").BufMap; |
| 13 | const fmt = @import("fmt.zig"); | |
| 13 | const fmt_lib = @import("fmt.zig"); | |
| 14 | 14 | |
| 15 | 15 | error ExtraArg; |
| 16 | 16 | error UncleanExit; |
| ... | ... | @@ -189,7 +189,7 @@ pub const Builder = struct { |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | pub fn addLog(self: &Builder, comptime format: []const u8, args: ...) -> &LogStep { |
| 192 | const data = %%fmt.allocPrint(self.allocator, format, args); | |
| 192 | const data = self.fmt(format, args); | |
| 193 | 193 | const log_step = %%self.allocator.create(LogStep); |
| 194 | 194 | *log_step = LogStep.init(self, data); |
| 195 | 195 | return log_step; |
| ... | ... | @@ -543,6 +543,10 @@ pub const Builder = struct { |
| 543 | 543 | fn pathFromRoot(self: &Builder, rel_path: []const u8) -> []u8 { |
| 544 | 544 | return %%os.path.join(self.allocator, self.build_root, rel_path); |
| 545 | 545 | } |
| 546 | ||
| 547 | pub fn fmt(self: &Builder, comptime format: []const u8, args: ...) -> []u8 { | |
| 548 | return %%fmt_lib.allocPrint(self.allocator, format, args); | |
| 549 | } | |
| 546 | 550 | }; |
| 547 | 551 | |
| 548 | 552 | const Version = struct { |
| ... | ... | @@ -891,19 +895,16 @@ pub const LinkStep = struct { |
| 891 | 895 | fn computeOutFileName(self: &LinkStep) { |
| 892 | 896 | switch (self.out_type) { |
| 893 | 897 | OutType.Exe => { |
| 894 | self.out_filename = %%fmt.allocPrint(self.builder.allocator, "{}{}", | |
| 895 | self.name, self.target.exeFileExt()); | |
| 898 | self.out_filename = self.builder.fmt("{}{}", self.name, self.target.exeFileExt()); | |
| 896 | 899 | }, |
| 897 | 900 | OutType.Lib => { |
| 898 | 901 | if (self.static) { |
| 899 | self.out_filename = %%fmt.allocPrint(self.builder.allocator, "lib{}.a", self.name); | |
| 902 | self.out_filename = self.builder.fmt("lib{}.a", self.name); | |
| 900 | 903 | } else { |
| 901 | self.out_filename = %%fmt.allocPrint(self.builder.allocator, "lib{}.so.{d}.{d}.{d}", | |
| 904 | self.out_filename = self.builder.fmt("lib{}.so.{d}.{d}.{d}", | |
| 902 | 905 | self.name, self.version.major, self.version.minor, self.version.patch); |
| 903 | self.major_only_filename = %%fmt.allocPrint(self.builder.allocator, | |
| 904 | "lib{}.so.{d}", self.name, self.version.major); | |
| 905 | self.name_only_filename = %%fmt.allocPrint(self.builder.allocator, | |
| 906 | "lib{}.so", self.name); | |
| 906 | self.major_only_filename = self.builder.fmt("lib{}.so.{d}", self.name, self.version.major); | |
| 907 | self.name_only_filename = self.builder.fmt("lib{}.so", self.name); | |
| 907 | 908 | } |
| 908 | 909 | }, |
| 909 | 910 | } |
| ... | ... | @@ -1051,15 +1052,19 @@ pub const TestStep = struct { |
| 1051 | 1052 | release: bool, |
| 1052 | 1053 | verbose: bool, |
| 1053 | 1054 | link_libs: BufSet, |
| 1055 | name_prefix: []const u8, | |
| 1056 | filter: ?[]const u8, | |
| 1054 | 1057 | |
| 1055 | 1058 | pub fn init(builder: &Builder, root_src: []const u8) -> TestStep { |
| 1056 | const step_name = %%fmt.allocPrint(builder.allocator, "test {}", root_src); | |
| 1059 | const step_name = builder.fmt("test {}", root_src); | |
| 1057 | 1060 | TestStep { |
| 1058 | 1061 | .step = Step.init(step_name, builder.allocator, make), |
| 1059 | 1062 | .builder = builder, |
| 1060 | 1063 | .root_src = root_src, |
| 1061 | 1064 | .release = false, |
| 1062 | 1065 | .verbose = false, |
| 1066 | .name_prefix = "", | |
| 1067 | .filter = null, | |
| 1063 | 1068 | .link_libs = BufSet.init(builder.allocator), |
| 1064 | 1069 | } |
| 1065 | 1070 | } |
| ... | ... | @@ -1076,6 +1081,14 @@ pub const TestStep = struct { |
| 1076 | 1081 | %%self.link_libs.put(name); |
| 1077 | 1082 | } |
| 1078 | 1083 | |
| 1084 | pub fn setNamePrefix(self: &TestStep, text: []const u8) { | |
| 1085 | self.name_prefix = text; | |
| 1086 | } | |
| 1087 | ||
| 1088 | pub fn setFilter(self: &TestStep, text: ?[]const u8) { | |
| 1089 | self.filter = text; | |
| 1090 | } | |
| 1091 | ||
| 1079 | 1092 | fn make(step: &Step) -> %void { |
| 1080 | 1093 | const self = @fieldParentPtr(TestStep, "step", step); |
| 1081 | 1094 | const builder = self.builder; |
| ... | ... | @@ -1094,6 +1107,16 @@ pub const TestStep = struct { |
| 1094 | 1107 | %%zig_args.append("--release"); |
| 1095 | 1108 | } |
| 1096 | 1109 | |
| 1110 | if (const filter ?= self.filter) { | |
| 1111 | %%zig_args.append("--test-filter"); | |
| 1112 | %%zig_args.append(filter); | |
| 1113 | } | |
| 1114 | ||
| 1115 | if (self.name_prefix.len != 0) { | |
| 1116 | %%zig_args.append("--test-name-prefix"); | |
| 1117 | %%zig_args.append(self.name_prefix); | |
| 1118 | } | |
| 1119 | ||
| 1097 | 1120 | { |
| 1098 | 1121 | var it = self.link_libs.iterator(); |
| 1099 | 1122 | while (true) { |
| ... | ... | @@ -1169,14 +1192,12 @@ pub const CLibrary = struct { |
| 1169 | 1192 | |
| 1170 | 1193 | fn computeOutFileName(self: &CLibrary) { |
| 1171 | 1194 | if (self.static) { |
| 1172 | self.out_filename = %%fmt.allocPrint(self.builder.allocator, "lib{}.a", self.name); | |
| 1195 | self.out_filename = self.builder.fmt("lib{}.a", self.name); | |
| 1173 | 1196 | } else { |
| 1174 | self.out_filename = %%fmt.allocPrint(self.builder.allocator, "lib{}.so.{d}.{d}.{d}", | |
| 1197 | self.out_filename = self.builder.fmt("lib{}.so.{d}.{d}.{d}", | |
| 1175 | 1198 | self.name, self.version.major, self.version.minor, self.version.patch); |
| 1176 | self.major_only_filename = %%fmt.allocPrint(self.builder.allocator, | |
| 1177 | "lib{}.so.{d}", self.name, self.version.major); | |
| 1178 | self.name_only_filename = %%fmt.allocPrint(self.builder.allocator, | |
| 1179 | "lib{}.so", self.name); | |
| 1199 | self.major_only_filename = self.builder.fmt("lib{}.so.{d}", self.name, self.version.major); | |
| 1200 | self.name_only_filename = self.builder.fmt("lib{}.so", self.name); | |
| 1180 | 1201 | } |
| 1181 | 1202 | } |
| 1182 | 1203 | |
| ... | ... | @@ -1235,7 +1256,7 @@ pub const CLibrary = struct { |
| 1235 | 1256 | %%cc_args.append(source_file); |
| 1236 | 1257 | |
| 1237 | 1258 | // TODO don't dump the .o file in the same place as the source file |
| 1238 | const o_file = %%fmt.allocPrint(builder.allocator, "{}{}", source_file, self.target.oFileExt()); | |
| 1259 | const o_file = builder.fmt("{}{}", source_file, self.target.oFileExt()); | |
| 1239 | 1260 | defer builder.allocator.free(o_file); |
| 1240 | 1261 | %%cc_args.append("-o"); |
| 1241 | 1262 | %%cc_args.append(o_file); |
| ... | ... | @@ -1262,8 +1283,7 @@ pub const CLibrary = struct { |
| 1262 | 1283 | %%cc_args.append("-fPIC"); |
| 1263 | 1284 | %%cc_args.append("-shared"); |
| 1264 | 1285 | |
| 1265 | const soname_arg = %%fmt.allocPrint(builder.allocator, "-Wl,-soname,lib{}.so.{d}", | |
| 1266 | self.name, self.version.major); | |
| 1286 | const soname_arg = builder.fmt("-Wl,-soname,lib{}.so.{d}", self.name, self.version.major); | |
| 1267 | 1287 | defer builder.allocator.free(soname_arg); |
| 1268 | 1288 | %%cc_args.append(soname_arg); |
| 1269 | 1289 | |
| ... | ... | @@ -1372,7 +1392,7 @@ pub const CExecutable = struct { |
| 1372 | 1392 | %%cc_args.append(source_file); |
| 1373 | 1393 | |
| 1374 | 1394 | // TODO don't dump the .o file in the same place as the source file |
| 1375 | const o_file = %%fmt.allocPrint(builder.allocator, "{}{}", source_file, self.target.oFileExt()); | |
| 1395 | const o_file = builder.fmt("{}{}", source_file, self.target.oFileExt()); | |
| 1376 | 1396 | defer builder.allocator.free(o_file); |
| 1377 | 1397 | %%cc_args.append("-o"); |
| 1378 | 1398 | %%cc_args.append(o_file); |
| ... | ... | @@ -1400,7 +1420,7 @@ pub const CExecutable = struct { |
| 1400 | 1420 | %%cc_args.append("-o"); |
| 1401 | 1421 | %%cc_args.append(self.name); |
| 1402 | 1422 | |
| 1403 | const rpath_arg = %%fmt.allocPrint(builder.allocator, "-Wl,-rpath,{}", builder.out_dir); | |
| 1423 | const rpath_arg = builder.fmt("-Wl,-rpath,{}", builder.out_dir); | |
| 1404 | 1424 | defer builder.allocator.free(rpath_arg); |
| 1405 | 1425 | %%cc_args.append(rpath_arg); |
| 1406 | 1426 | |
| ... | ... | @@ -1462,9 +1482,7 @@ pub const InstallCLibraryStep = struct { |
| 1462 | 1482 | pub fn init(builder: &Builder, lib: &CLibrary) -> InstallCLibraryStep { |
| 1463 | 1483 | var self = InstallCLibraryStep { |
| 1464 | 1484 | .builder = builder, |
| 1465 | .step = Step.init( | |
| 1466 | %%fmt.allocPrint(builder.allocator, "install {}", lib.step.name), | |
| 1467 | builder.allocator, make), | |
| 1485 | .step = Step.init(builder.fmt("install {}", lib.step.name), builder.allocator, make), | |
| 1468 | 1486 | .lib = lib, |
| 1469 | 1487 | .dest_file = undefined, |
| 1470 | 1488 | }; |
| ... | ... | @@ -1497,9 +1515,7 @@ pub const InstallFileStep = struct { |
| 1497 | 1515 | pub fn init(builder: &Builder, src_path: []const u8, dest_path: []const u8) -> InstallFileStep { |
| 1498 | 1516 | return InstallFileStep { |
| 1499 | 1517 | .builder = builder, |
| 1500 | .step = Step.init( | |
| 1501 | %%fmt.allocPrint(builder.allocator, "install {}", src_path), | |
| 1502 | builder.allocator, make), | |
| 1518 | .step = Step.init(builder.fmt("install {}", src_path), builder.allocator, make), | |
| 1503 | 1519 | .src_path = src_path, |
| 1504 | 1520 | .dest_path = dest_path, |
| 1505 | 1521 | }; |
| ... | ... | @@ -1521,9 +1537,7 @@ pub const WriteFileStep = struct { |
| 1521 | 1537 | pub fn init(builder: &Builder, file_path: []const u8, data: []const u8) -> WriteFileStep { |
| 1522 | 1538 | return WriteFileStep { |
| 1523 | 1539 | .builder = builder, |
| 1524 | .step = Step.init( | |
| 1525 | %%fmt.allocPrint(builder.allocator, "writefile {}", file_path), | |
| 1526 | builder.allocator, make), | |
| 1540 | .step = Step.init(builder.fmt("writefile {}", file_path), builder.allocator, make), | |
| 1527 | 1541 | .file_path = file_path, |
| 1528 | 1542 | .data = data, |
| 1529 | 1543 | }; |
| ... | ... | @@ -1550,9 +1564,7 @@ pub const LogStep = struct { |
| 1550 | 1564 | pub fn init(builder: &Builder, data: []const u8) -> LogStep { |
| 1551 | 1565 | return LogStep { |
| 1552 | 1566 | .builder = builder, |
| 1553 | .step = Step.init( | |
| 1554 | %%fmt.allocPrint(builder.allocator, "log {}", data), | |
| 1555 | builder.allocator, make), | |
| 1567 | .step = Step.init(builder.fmt("log {}", data), builder.allocator, make), | |
| 1556 | 1568 | .data = data, |
| 1557 | 1569 | }; |
| 1558 | 1570 | } |
test/behavior.zig created+39| ... | ... | @@ -0,0 +1,39 @@ |
| 1 | comptime { | |
| 2 | _ = @import("cases/array.zig"); | |
| 3 | _ = @import("cases/asm.zig"); | |
| 4 | _ = @import("cases/atomics.zig"); | |
| 5 | _ = @import("cases/bool.zig"); | |
| 6 | _ = @import("cases/cast.zig"); | |
| 7 | _ = @import("cases/const_slice_child.zig"); | |
| 8 | _ = @import("cases/defer.zig"); | |
| 9 | _ = @import("cases/enum.zig"); | |
| 10 | _ = @import("cases/enum_with_members.zig"); | |
| 11 | _ = @import("cases/error.zig"); | |
| 12 | _ = @import("cases/eval.zig"); | |
| 13 | _ = @import("cases/field_parent_ptr.zig"); | |
| 14 | _ = @import("cases/fn.zig"); | |
| 15 | _ = @import("cases/for.zig"); | |
| 16 | _ = @import("cases/generics.zig"); | |
| 17 | _ = @import("cases/goto.zig"); | |
| 18 | _ = @import("cases/if.zig"); | |
| 19 | _ = @import("cases/import.zig"); | |
| 20 | _ = @import("cases/incomplete_struct_param_tld.zig"); | |
| 21 | _ = @import("cases/ir_block_deps.zig"); | |
| 22 | _ = @import("cases/math.zig"); | |
| 23 | _ = @import("cases/misc.zig"); | |
| 24 | _ = @import("cases/namespace_depends_on_compile_var/index.zig"); | |
| 25 | _ = @import("cases/null.zig"); | |
| 26 | _ = @import("cases/pub_enum/index.zig"); | |
| 27 | _ = @import("cases/sizeof_and_typeof.zig"); | |
| 28 | _ = @import("cases/struct.zig"); | |
| 29 | _ = @import("cases/struct_contains_slice_of_itself.zig"); | |
| 30 | _ = @import("cases/switch.zig"); | |
| 31 | _ = @import("cases/switch_prong_err_enum.zig"); | |
| 32 | _ = @import("cases/switch_prong_implicit_cast.zig"); | |
| 33 | _ = @import("cases/this.zig"); | |
| 34 | _ = @import("cases/try.zig"); | |
| 35 | _ = @import("cases/undefined.zig"); | |
| 36 | _ = @import("cases/var_args.zig"); | |
| 37 | _ = @import("cases/void.zig"); | |
| 38 | _ = @import("cases/while.zig"); | |
| 39 | } |
test/self_hosted.zig deleted-39| ... | ... | @@ -1,39 +0,0 @@ |
| 1 | comptime { | |
| 2 | _ = @import("cases/array.zig"); | |
| 3 | _ = @import("cases/asm.zig"); | |
| 4 | _ = @import("cases/atomics.zig"); | |
| 5 | _ = @import("cases/bool.zig"); | |
| 6 | _ = @import("cases/cast.zig"); | |
| 7 | _ = @import("cases/const_slice_child.zig"); | |
| 8 | _ = @import("cases/defer.zig"); | |
| 9 | _ = @import("cases/enum.zig"); | |
| 10 | _ = @import("cases/enum_with_members.zig"); | |
| 11 | _ = @import("cases/error.zig"); | |
| 12 | _ = @import("cases/eval.zig"); | |
| 13 | _ = @import("cases/field_parent_ptr.zig"); | |
| 14 | _ = @import("cases/fn.zig"); | |
| 15 | _ = @import("cases/for.zig"); | |
| 16 | _ = @import("cases/generics.zig"); | |
| 17 | _ = @import("cases/goto.zig"); | |
| 18 | _ = @import("cases/if.zig"); | |
| 19 | _ = @import("cases/import.zig"); | |
| 20 | _ = @import("cases/incomplete_struct_param_tld.zig"); | |
| 21 | _ = @import("cases/ir_block_deps.zig"); | |
| 22 | _ = @import("cases/math.zig"); | |
| 23 | _ = @import("cases/misc.zig"); | |
| 24 | _ = @import("cases/namespace_depends_on_compile_var/index.zig"); | |
| 25 | _ = @import("cases/null.zig"); | |
| 26 | _ = @import("cases/pub_enum/index.zig"); | |
| 27 | _ = @import("cases/sizeof_and_typeof.zig"); | |
| 28 | _ = @import("cases/struct.zig"); | |
| 29 | _ = @import("cases/struct_contains_slice_of_itself.zig"); | |
| 30 | _ = @import("cases/switch.zig"); | |
| 31 | _ = @import("cases/switch_prong_err_enum.zig"); | |
| 32 | _ = @import("cases/switch_prong_implicit_cast.zig"); | |
| 33 | _ = @import("cases/this.zig"); | |
| 34 | _ = @import("cases/try.zig"); | |
| 35 | _ = @import("cases/undefined.zig"); | |
| 36 | _ = @import("cases/var_args.zig"); | |
| 37 | _ = @import("cases/void.zig"); | |
| 38 | _ = @import("cases/while.zig"); | |
| 39 | } |
test/tests.zig+2-2| ... | ... | @@ -341,8 +341,8 @@ pub const CompareOutputContext = struct { |
| 341 | 341 | }, |
| 342 | 342 | Special.None => { |
| 343 | 343 | for ([]bool{false, true}) |release| { |
| 344 | const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "{} ({})", | |
| 345 | case.name, if (release) "release" else "debug"); | |
| 344 | const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "{} {} ({})", | |
| 345 | "compare-output", case.name, if (release) "release" else "debug"); | |
| 346 | 346 | if (const filter ?= self.test_filter) { |
| 347 | 347 | if (mem.indexOf(u8, annotated_case_name, filter) == null) |
| 348 | 348 | continue; |