nitunit: rename `has_status` and cie to `has_progress_bar`
[nit.git] / src / testing / testing_suite.nit
index 6a10288..309393c 100644 (file)
@@ -132,8 +132,14 @@ class TestSuite
        # Test to be executed after the whole test suite.
        var after_module: nullable TestCase = null
 
+       fun show_status
+       do
+               toolcontext.show_unit_status("Test-suite of module " + mmodule.full_name, test_cases)
+       end
+
        # Execute the test suite
        fun run do
+               show_status
                if not toolcontext.test_dir.file_exists then
                        toolcontext.test_dir.mkdir
                end
@@ -142,12 +148,18 @@ class TestSuite
                toolcontext.info("Execute test-suite {mmodule.name}", 1)
                var before_module = self.before_module
                if not before_module == null then before_module.run
-               for case in test_cases do case.run
-               var after_module = self.after_module
-               if not after_module == null then after_module.run
                for case in test_cases do
-                       print case.to_screen
+                       case.run
+                       toolcontext.clear_progress_bar
+                       toolcontext.show_unit(case)
+                       show_status
                end
+
+               var after_module = self.after_module
+               if not after_module == null then after_module.run
+
+               show_status
+               print ""
        end
 
        # Write the test unit for `self` in a nit compilable file.