authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-12-19 14:52:12-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-12-20 15:08:59-07:00
loge00b6db2aa2e3aa7e61c4b1ccebf4ebdb6e2d45a
tree5221e29289380554adab90f18110eb87590ede9a
parentaa6ef10cc657e2bbe59c362f27d7a557c43d7fae

update stage2 test harness to new std.Progress API


1 files changed, 12 insertions(+), 12 deletions(-)

src/test.zig+12-12
......@@ -578,12 +578,12 @@ pub const TestContext = struct {
578578 update_node.activate();
579579 defer update_node.end();
580580
581 var sync_node = update_node.start("write", null);
581 var sync_node = update_node.start("write", 0);
582582 sync_node.activate();
583583 try tmp.dir.writeFile(tmp_src_path, update.src);
584584 sync_node.end();
585585
586 var module_node = update_node.start("parse/analysis/codegen", null);
586 var module_node = update_node.start("parse/analysis/codegen", 0);
587587 module_node.activate();
588588 try comp.makeBinFileWritable();
589589 try comp.update();
......@@ -635,21 +635,21 @@ pub const TestContext = struct {
635635 }
636636 }
637637 } else {
638 update_node.estimated_total_items = 5;
639 var emit_node = update_node.start("emit", null);
638 update_node.setEstimatedTotalItems(5);
639 var emit_node = update_node.start("emit", 0);
640640 emit_node.activate();
641641 var new_zir_module = try zir.emit(allocator, comp.bin_file.options.module.?);
642642 defer new_zir_module.deinit(allocator);
643643 emit_node.end();
644644
645 var write_node = update_node.start("write", null);
645 var write_node = update_node.start("write", 0);
646646 write_node.activate();
647647 var out_zir = std.ArrayList(u8).init(allocator);
648648 defer out_zir.deinit();
649649 try new_zir_module.writeToStream(allocator, out_zir.outStream());
650650 write_node.end();
651651
652 var test_node = update_node.start("assert", null);
652 var test_node = update_node.start("assert", 0);
653653 test_node.activate();
654654 defer test_node.end();
655655
......@@ -666,7 +666,7 @@ pub const TestContext = struct {
666666 }
667667 },
668668 .Error => |e| {
669 var test_node = update_node.start("assert", null);
669 var test_node = update_node.start("assert", 0);
670670 test_node.activate();
671671 defer test_node.end();
672672 var handled_errors = try arena.alloc(bool, e.len);
......@@ -723,9 +723,9 @@ pub const TestContext = struct {
723723 .Execution => |expected_stdout| {
724724 std.debug.assert(!case.cbe);
725725
726 update_node.estimated_total_items = 4;
726 update_node.setEstimatedTotalItems(4);
727727 var exec_result = x: {
728 var exec_node = update_node.start("execute", null);
728 var exec_node = update_node.start("execute", 0);
729729 exec_node.activate();
730730 defer exec_node.end();
731731
......@@ -788,7 +788,7 @@ pub const TestContext = struct {
788788 .cwd_dir = tmp.dir,
789789 });
790790 };
791 var test_node = update_node.start("test", null);
791 var test_node = update_node.start("test", 0);
792792 test_node.activate();
793793 defer test_node.end();
794794 defer allocator.free(exec_result.stdout);
......@@ -867,7 +867,7 @@ pub const TestContext = struct {
867867 };
868868
869869 {
870 var load_node = update_node.start("load", null);
870 var load_node = update_node.start("load", 0);
871871 load_node.activate();
872872 defer load_node.end();
873873
......@@ -905,7 +905,7 @@ pub const TestContext = struct {
905905 }
906906 }
907907
908 var exec_node = update_node.start("execute", null);
908 var exec_node = update_node.start("execute", 0);
909909 exec_node.activate();
910910 defer exec_node.end();
911911