From: Jean Privat Date: Fri, 27 May 2016 18:47:56 +0000 (-0400) Subject: Merge: Docunit --no-color X-Git-Url: http://nitlanguage.org?hp=10993048736f34b3974cc99a462446ad9a26fa9b Merge: Docunit --no-color Small last nitpicks on nitnuit * --no-color mode * better summary at the end * working dir no more hidden and removed on success Pull-Request: #2131 --- diff --git a/share/man/nitunit.md b/share/man/nitunit.md index e80e80e..6f09402 100644 --- a/share/man/nitunit.md +++ b/share/man/nitunit.md @@ -268,10 +268,13 @@ Output name (default is 'nitunit.xml'). `nitunit` produces a XML file compatible with JUnit. ### `--dir` -Working directory (default is '.nitunit'). +Working directory (default is 'nitunit.out'). In order to execute the tests, nit files are generated then compiled and executed in the giver working directory. +In case of success, the directory is removed. +In case of failure, it is kept as is so files can be investigated. + ### `--nitc` nitc compiler to use. diff --git a/src/nitunit.nit b/src/nitunit.nit index 878d3f2..8d79e80 100644 --- a/src/nitunit.nit +++ b/src/nitunit.nit @@ -98,19 +98,62 @@ end var file = toolcontext.opt_output.value if file == null then file = "nitunit.xml" page.write_to_file(file) -# print docunits results -print "DocUnits:" -if modelbuilder.unit_entities == 0 then - print "No doc units found" -else if modelbuilder.failed_entities == 0 and not toolcontext.opt_noact.value then - print "DocUnits Success" + +# Print results +printn "Docunits: Entities: {modelbuilder.total_entities}; Documented ones: {modelbuilder.doc_entities}; With nitunits: {modelbuilder.unit_entities}" +if modelbuilder.unit_entities == 0 or toolcontext.opt_noact.value then + print "" +else + printn "; Failures: " + var cpt = modelbuilder.failed_entities + if toolcontext.opt_no_color.value then + print cpt + else if cpt == 0 then + print "0".green.bold + else + print cpt.to_s.red.bold + end end -print "Entities: {modelbuilder.total_entities}; Documented ones: {modelbuilder.doc_entities}; With nitunits: {modelbuilder.unit_entities}; Failures: {modelbuilder.failed_entities}" -# print testsuites results -print "\nTestSuites:" -if modelbuilder.total_tests == 0 then - print "No test cases found" -else if modelbuilder.failed_tests == 0 and not toolcontext.opt_noact.value then - print "TestSuites Success" +printn "Test suites: Classes: {modelbuilder.total_classes}; Test Cases: {modelbuilder.total_tests}" +if modelbuilder.total_tests == 0 or toolcontext.opt_noact.value then + print "" +else + printn "; Failures: " + var cpt = modelbuilder.failed_tests + if toolcontext.opt_no_color.value then + print cpt + else if cpt == 0 then + print "0".green.bold + else + print cpt.to_s.red.bold + end end -print "Class suites: {modelbuilder.total_classes}; Test Cases: {modelbuilder.total_tests}; Failures: {modelbuilder.failed_tests}" + +var total = modelbuilder.unit_entities + modelbuilder.total_tests +var fail = modelbuilder.failed_entities + modelbuilder.failed_tests +if toolcontext.opt_noact.value then + # nothing +else if total == 0 then + var head = "[NOTHING]" + if not toolcontext.opt_no_color.value then + head = head.yellow + end + print "{head} No unit tests to execute." +else if fail == 0 then + var head = "[SUCCESS]" + if not toolcontext.opt_no_color.value then + head = head.green.bold + end + print "{head} All {total} tests passed." +else + var head = "[FAILURE]" + if not toolcontext.opt_no_color.value then + head = head.red.bold + end + print "{head} {fail}/{total} tests failed." + + print "`{test_dir}` is not removed for investigation." + exit 1 +end + +test_dir.rmdir diff --git a/src/testing/testing_base.nit b/src/testing/testing_base.nit index 88651ef..ddc167f 100644 --- a/src/testing/testing_base.nit +++ b/src/testing/testing_base.nit @@ -35,7 +35,7 @@ redef class ToolContext # Working directory for testing. fun test_dir: String do var dir = opt_dir.value - if dir == null then return ".nitunit" + if dir == null then return "nitunit.out" return dir end @@ -116,6 +116,14 @@ ulimit -t {{{ulimit_usertime}}} 2> /dev/null line += "X".red.bold end end + + if opt_no_color.value then + if done == 0 then + print "* {name} ({tests.length} tests)" + end + return + end + line += "] {done}/{tests.length}" if more_message != null then line += " " + more_message @@ -123,6 +131,14 @@ ulimit -t {{{ulimit_usertime}}} 2> /dev/null printn "{line}" end + # Shoe the full description of the test-case. + # + # The output honors `--no-color`. + # + # `more message`, if any, is added after the error message. + fun show_unit(test: UnitTest, more_message: nullable String) do + print test.to_screen(more_message, not opt_no_color.value) + end end # A unit test is an elementary test discovered, run and reported by nitunit. @@ -157,32 +173,42 @@ abstract class UnitTest var error_location: nullable Location = null is writable # A colorful `[OK]` or `[KO]`. - fun status_tag: String do + fun status_tag(color: nullable Bool): String do + color = color or else true if not is_done then return "[ ]" else if error != null then - return "[KO]".red.bold + var res = "[KO]" + if color then res = res.red.bold + return res else - return "[OK]".green.bold + var res = "[OK]" + if color then res = res.green.bold + return res end end # The full (color) description of the test-case. # # `more message`, if any, is added after the error message. - fun to_screen(more_message: nullable String): String do + fun to_screen(more_message: nullable String, color: nullable Bool): String do + color = color or else true var res var error = self.error if error != null then if more_message != null then error += " " + more_message var loc = error_location or else location - res = "{status_tag} {full_name}\n {loc.to_s.yellow}: {error}\n{loc.colored_line("1;31")}" + if color then + res = "{status_tag(color)} {full_name}\n {loc.to_s.yellow}: {error}\n{loc.colored_line("1;31")}" + else + res = "{status_tag(color)} {full_name}\n {loc}: {error}" + end var output = self.raw_output if output != null then res += "\n Output\n\t{output.chomp.replace("\n", "\n\t")}\n" end else - res = "{status_tag} {full_name}" + res = "{status_tag(color)} {full_name}" if more_message != null then res += more_message end return res diff --git a/src/testing/testing_doc.nit b/src/testing/testing_doc.nit index 2465d37..a2fa067 100644 --- a/src/testing/testing_doc.nit +++ b/src/testing/testing_doc.nit @@ -119,7 +119,7 @@ class NitUnitExecutor print "" for du in docunits do - print du.to_screen + toolcontext.show_unit(du) end for du in docunits do diff --git a/src/testing/testing_suite.nit b/src/testing/testing_suite.nit index bbe9372..f755d25 100644 --- a/src/testing/testing_suite.nit +++ b/src/testing/testing_suite.nit @@ -159,7 +159,7 @@ class TestSuite 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 + toolcontext.show_unit(case) end end diff --git a/tests/nitunit.args b/tests/nitunit.args index 390709a..2116656 100644 --- a/tests/nitunit.args +++ b/tests/nitunit.args @@ -1,7 +1,7 @@ test_nitunit.nit --no-color -o $WRITE test_nitunit.nit --gen-suite --only-show test_nitunit.nit --gen-suite --only-show --private -test_nitunit2.nit -o $WRITE +test_nitunit2.nit --no-color -o $WRITE test_doc2.nit --no-color -o $WRITE test_nitunit3 --no-color -o $WRITE test_nitunit_md.md --no-color -o $WRITE diff --git a/tests/sav/nitunit_args1.res b/tests/sav/nitunit_args1.res index cbfe0bc..a45c8d4 100644 --- a/tests/sav/nitunit_args1.res +++ b/tests/sav/nitunit_args1.res @@ -1,43 +1,36 @@ - * Docunits of module test_nitunit::test_nitunit [ ] 0/4 * Docunits of module test_nitunit::test_nitunit [ X] 1/4 test_nitunit$X$foo1 [KO] * Docunits of module test_nitunit::test_nitunit [. X] 2/4 test_nitunit::test_nitunit [OK] * Docunits of module test_nitunit::test_nitunit [.X X] 3/4 test_nitunit$X [KO] * Docunits of module test_nitunit::test_nitunit [.XXX] 4/4 test_nitunit$X$foo [KO] * Docunits of module test_nitunit::test_nitunit [.XXX] 4/4 -[OK] test_nitunit::test_nitunit -[KO] test_nitunit$X - test_nitunit.nit:21,7--22,0: Runtime error in .nitunit/test_nitunit-2.nit - # assert false - ^ +* Docunits of module test_nitunit::test_nitunit (4 tests) + +[OK] test_nitunit::test_nitunit +[KO] test_nitunit$X + test_nitunit.nit:21,7--22,0: Runtime error in nitunit.out/test_nitunit-2.nit Output - Runtime error: Assert failed (.nitunit/test_nitunit-2.nit:5) + Runtime error: Assert failed (nitunit.out/test_nitunit-2.nit:5) -[KO] test_nitunit$X$foo - test_nitunit.nit:24,8--25,0: Compilation error in .nitunit/test_nitunit-3.nit - # assert undefined_identifier - ^ +[KO] test_nitunit$X$foo + test_nitunit.nit:24,8--25,0: Compilation error in nitunit.out/test_nitunit-3.nit Output - .nitunit/test_nitunit-3.nit:5,8--27: Error: method or variable `undefined_identifier` unknown in `Sys`. + nitunit.out/test_nitunit-3.nit:5,8--27: Error: method or variable `undefined_identifier` unknown in `Sys`. + +[KO] test_nitunit$X$foo1 + test_nitunit.nit:28,15: Syntax Error: unexpected operator '!'. +* Test-suite of module test_test_nitunit::test_test_nitunit (3 tests) -[KO] test_nitunit$X$foo1 - test_nitunit.nit:28,15: Syntax Error: unexpected operator '!'. - # assert !@#$%^&*() - ^ - * Test-suite of module test_test_nitunit::test_test_nitunit [ ] 0/3 * Test-suite of module test_test_nitunit::test_test_nitunit [. ] 1/3 test_test_nitunit$TestX$test_foo [OK] * Test-suite of module test_test_nitunit::test_test_nitunit [.X ] 2/3 test_test_nitunit$TestX$test_foo1 [KO] * Test-suite of module test_test_nitunit::test_test_nitunit [.X.] 3/3 test_test_nitunit$TestX$test_foo2 [OK] * Test-suite of module test_test_nitunit::test_test_nitunit [.X.] 3/3 -[OK] test_test_nitunit$TestX$test_foo -[KO] test_test_nitunit$TestX$test_foo1 - test_test_nitunit.nit:36,2--40,4: Runtime Error in file .nitunit/gen_test_test_nitunit.nit - # will fail - ^ +[OK] test_test_nitunit$TestX$test_foo +[KO] test_test_nitunit$TestX$test_foo1 + test_test_nitunit.nit:36,2--40,4: Runtime Error in file nitunit.out/gen_test_test_nitunit.nit Output Runtime error: Assert failed (test_test_nitunit.nit:39) -[OK] test_test_nitunit$TestX$test_foo2 -DocUnits: -Entities: 27; Documented ones: 4; With nitunits: 4; Failures: 3 - -TestSuites: -Class suites: 1; Test Cases: 3; Failures: 1 +[OK] test_test_nitunit$TestX$test_foo2 +Docunits: Entities: 27; Documented ones: 4; With nitunits: 4; Failures: 3 +Test suites: Classes: 1; Test Cases: 3; Failures: 1 +[FAILURE] 4/7 tests failed. +`nitunit.out` is not removed for investigation. assert true -Runtime error in .nitunit/test_nitunit-2.nitRuntime error: Assert failed (.nitunit/test_nitunit-2.nit:5) +Runtime error in nitunit.out/test_nitunit-2.nitRuntime error: Assert failed (nitunit.out/test_nitunit-2.nit:5) assert false -Compilation error in .nitunit/test_nitunit-3.nit.nitunit/test_nitunit-3.nit:5,8--27: Error: method or variable `undefined_identifier` unknown in `Sys`. +Compilation error in nitunit.out/test_nitunit-3.nitnitunit.out/test_nitunit-3.nit:5,8--27: Error: method or variable `undefined_identifier` unknown in `Sys`. assert undefined_identifier Syntax Error: unexpected operator '!'.assert !@#$%^&*() -Runtime Error in file .nitunit/gen_test_test_nitunit.nitRuntime error: Assert failed (test_test_nitunit.nit:39) +Runtime Error in file nitunit.out/gen_test_test_nitunit.nitRuntime error: Assert failed (test_test_nitunit.nit:39) \ No newline at end of file diff --git a/tests/sav/nitunit_args4.res b/tests/sav/nitunit_args4.res index 95b3751..a1f4cb1 100644 --- a/tests/sav/nitunit_args4.res +++ b/tests/sav/nitunit_args4.res @@ -1,14 +1,11 @@ - * Docunits of module test_nitunit2::test_nitunit2 [ ] 0/3 * Docunits of module test_nitunit2::test_nitunit2 [. ] 1/3 test_nitunit2::test_nitunit2$core::Sys$foo1 [OK] * Docunits of module test_nitunit2::test_nitunit2 [.. ] 2/3 test_nitunit2::test_nitunit2$core::Sys$bar2 [OK] * Docunits of module test_nitunit2::test_nitunit2 [...] 3/3 test_nitunit2::test_nitunit2$core::Sys$foo3 [OK] * Docunits of module test_nitunit2::test_nitunit2 [...] 3/3 -[OK] test_nitunit2::test_nitunit2$core::Sys$foo1 -[OK] test_nitunit2::test_nitunit2$core::Sys$bar2 -[OK] test_nitunit2::test_nitunit2$core::Sys$foo3 -DocUnits: -DocUnits Success -Entities: 4; Documented ones: 3; With nitunits: 3; Failures: 0 +* Docunits of module test_nitunit2::test_nitunit2 (3 tests) -TestSuites: -No test cases found -Class suites: 0; Test Cases: 0; Failures: 0 +[OK] test_nitunit2::test_nitunit2$core::Sys$foo1 +[OK] test_nitunit2::test_nitunit2$core::Sys$bar2 +[OK] test_nitunit2::test_nitunit2$core::Sys$foo3 +Docunits: Entities: 4; Documented ones: 3; With nitunits: 3; Failures: 0 +Test suites: Classes: 0; Test Cases: 0 +[SUCCESS] All 3 tests passed. if true then assert true diff --git a/tests/sav/nitunit_args5.res b/tests/sav/nitunit_args5.res index f161044..3e25819 100644 --- a/tests/sav/nitunit_args5.res +++ b/tests/sav/nitunit_args5.res @@ -1,14 +1,11 @@ - * Docunits of module test_doc2::test_doc2 [ ] 0/3 * Docunits of module test_doc2::test_doc2 [. ] 1/3 test_doc2::test_doc2$core::Sys$foo1 [OK] * Docunits of module test_doc2::test_doc2 [.. ] 2/3 test_doc2::test_doc2$core::Sys$foo2 [OK] * Docunits of module test_doc2::test_doc2 [...] 3/3 test_doc2::test_doc2$core::Sys$foo3 [OK] * Docunits of module test_doc2::test_doc2 [...] 3/3 -[OK] test_doc2::test_doc2$core::Sys$foo1 -[OK] test_doc2::test_doc2$core::Sys$foo2 -[OK] test_doc2::test_doc2$core::Sys$foo3 -DocUnits: -DocUnits Success -Entities: 6; Documented ones: 5; With nitunits: 3; Failures: 0 +* Docunits of module test_doc2::test_doc2 (3 tests) -TestSuites: -No test cases found -Class suites: 0; Test Cases: 0; Failures: 0 +[OK] test_doc2::test_doc2$core::Sys$foo1 +[OK] test_doc2::test_doc2$core::Sys$foo2 +[OK] test_doc2::test_doc2$core::Sys$foo3 +Docunits: Entities: 6; Documented ones: 5; With nitunits: 3; Failures: 0 +Test suites: Classes: 0; Test Cases: 0 +[SUCCESS] All 3 tests passed. assert true # tested assert true # tested assert true # tested diff --git a/tests/sav/nitunit_args6.res b/tests/sav/nitunit_args6.res index 13ff875..2b931af 100644 --- a/tests/sav/nitunit_args6.res +++ b/tests/sav/nitunit_args6.res @@ -1,25 +1,20 @@ - * Docunits of group test_nitunit3> [ ] 0/2 * Docunits of group test_nitunit3> [ X] 1/2 test_nitunit3> [KO] * Docunits of group test_nitunit3> [XX] 2/2 test_nitunit3> [KO] * Docunits of group test_nitunit3> [XX] 2/2 -[KO] test_nitunit3> - test_nitunit3/README.md:4,2--15,0: Runtime error in .nitunit/test_nitunit3-0.nit with argument 1 - ~~ - ^ +* Docunits of group test_nitunit3> (2 tests) + +[KO] test_nitunit3> + test_nitunit3/README.md:4,2--15,0: Runtime error in nitunit.out/test_nitunit3-0.nit with argument 1 Output - Runtime error: Assert failed (.nitunit/test_nitunit3-0.nit:7) + Runtime error: Assert failed (nitunit.out/test_nitunit3-0.nit:7) -[KO] test_nitunit3> - test_nitunit3/README.md:7,3--5: Syntax Error: unexpected malformed character '\]. - ~~~ -; - ^ - * Docunits of module test_nitunit3::test_nitunit3 [ ] 0/1 * Docunits of module test_nitunit3::test_nitunit3 [.] 1/1 test_nitunit3::test_nitunit3 [OK] * Docunits of module test_nitunit3::test_nitunit3 [.] 1/1 -[OK] test_nitunit3::test_nitunit3 -DocUnits: -Entities: 2; Documented ones: 2; With nitunits: 3; Failures: 2 +[KO] test_nitunit3> + test_nitunit3/README.md:7,3--5: Syntax Error: unexpected malformed character '\]. +* Docunits of module test_nitunit3::test_nitunit3 (1 tests) -TestSuites: -No test cases found -Class suites: 0; Test Cases: 0; Failures: 0 -Runtime error in .nitunit/test_nitunit3-0.nit with argument 1Runtime error: Assert failed (.nitunit/test_nitunit3-0.nit:7) +[OK] test_nitunit3::test_nitunit3 +Docunits: Entities: 2; Documented ones: 2; With nitunits: 3; Failures: 2 +Test suites: Classes: 0; Test Cases: 0 +[FAILURE] 2/3 tests failed. +`nitunit.out` is not removed for investigation. +Runtime error in nitunit.out/test_nitunit3-0.nit with argument 1Runtime error: Assert failed (nitunit.out/test_nitunit3-0.nit:7) assert false assert true Syntax Error: unexpected malformed character '\].;'\][] diff --git a/tests/sav/nitunit_args7.res b/tests/sav/nitunit_args7.res index bf0c504..4550bb5 100644 --- a/tests/sav/nitunit_args7.res +++ b/tests/sav/nitunit_args7.res @@ -1,18 +1,15 @@ - * Docunits of file test_nitunit_md.md:1,0--15,0 [ ] 0/1 * Docunits of file test_nitunit_md.md:1,0--15,0 [X] 1/1 nitunit..test_nitunit_md.md:1,0--15,0 [KO] * Docunits of file test_nitunit_md.md:1,0--15,0 [X] 1/1 -[KO] nitunit..test_nitunit_md.md:1,0--15,0 - test_nitunit_md.md:4,2--16,0: Runtime error in .nitunit/file-0.nit with argument 1 - ~~ - ^ - Output - Runtime error: Assert failed (.nitunit/file-0.nit:8) +* Docunits of file test_nitunit_md.md:1,0--15,0 (1 tests) -DocUnits: -Entities: 1; Documented ones: 1; With nitunits: 1; Failures: 1 +[KO] nitunit..test_nitunit_md.md:1,0--15,0 + test_nitunit_md.md:4,2--16,0: Runtime error in nitunit.out/file-0.nit with argument 1 + Output + Runtime error: Assert failed (nitunit.out/file-0.nit:8) -TestSuites: -No test cases found -Class suites: 0; Test Cases: 0; Failures: 0 -Runtime error in .nitunit/file-0.nit with argument 1Runtime error: Assert failed (.nitunit/file-0.nit:8) +Docunits: Entities: 1; Documented ones: 1; With nitunits: 1; Failures: 1 +Test suites: Classes: 0; Test Cases: 0 +[FAILURE] 1/1 tests failed. +`nitunit.out` is not removed for investigation. +Runtime error in nitunit.out/file-0.nit with argument 1Runtime error: Assert failed (nitunit.out/file-0.nit:8) var a = 1 assert 1 == 1 assert false diff --git a/tests/sav/nitunit_args8.res b/tests/sav/nitunit_args8.res index c3e9bf7..65fd9b3 100644 --- a/tests/sav/nitunit_args8.res +++ b/tests/sav/nitunit_args8.res @@ -1,22 +1,15 @@ - * Docunits of module test_doc3::test_doc3 [ ] 0/3 * Docunits of module test_doc3::test_doc3 [X ] 1/3 test_doc3::test_doc3$core::Sys$foo1 [KO] * Docunits of module test_doc3::test_doc3 [XX ] 2/3 test_doc3::test_doc3$core::Sys$foo2 [KO] * Docunits of module test_doc3::test_doc3 [XXX] 3/3 test_doc3::test_doc3$core::Sys$foo3 [KO] * Docunits of module test_doc3::test_doc3 [XXX] 3/3 -[KO] test_doc3::test_doc3$core::Sys$foo1 - test_doc3.nit:17,9--15: Syntax Error: unexpected identifier 'garbage'. - # *garbage* - ^ -[KO] test_doc3::test_doc3$core::Sys$foo2 - test_doc3.nit:23,4--10: Syntax Error: unexpected identifier 'garbage'. - # *garbage* - ^ -[KO] test_doc3::test_doc3$core::Sys$foo3 - test_doc3.nit:30,4--10: Syntax Error: unexpected identifier 'garbage'. - # *garbage* - ^ -DocUnits: -Entities: 6; Documented ones: 5; With nitunits: 3; Failures: 3 +* Docunits of module test_doc3::test_doc3 (3 tests) -TestSuites: -No test cases found -Class suites: 0; Test Cases: 0; Failures: 0 +[KO] test_doc3::test_doc3$core::Sys$foo1 + test_doc3.nit:17,9--15: Syntax Error: unexpected identifier 'garbage'. +[KO] test_doc3::test_doc3$core::Sys$foo2 + test_doc3.nit:23,4--10: Syntax Error: unexpected identifier 'garbage'. +[KO] test_doc3::test_doc3$core::Sys$foo3 + test_doc3.nit:30,4--10: Syntax Error: unexpected identifier 'garbage'. +Docunits: Entities: 6; Documented ones: 5; With nitunits: 3; Failures: 3 +Test suites: Classes: 0; Test Cases: 0 +[FAILURE] 3/3 tests failed. +`nitunit.out` is not removed for investigation. Syntax Error: unexpected identifier 'garbage'. *garbage* Syntax Error: unexpected identifier 'garbage'.*garbage* Syntax Error: unexpected identifier 'garbage'.*garbage* diff --git a/tests/sav/nitunit_args9.res b/tests/sav/nitunit_args9.res index 5806e40..7aa0887 100644 --- a/tests/sav/nitunit_args9.res +++ b/tests/sav/nitunit_args9.res @@ -1,45 +1,40 @@ - * Test-suite of module test_nitunit4::test_nitunit4 [ ] 0/3 * Test-suite of module test_nitunit4::test_nitunit4 [X ] 1/3 test_nitunit4$TestTestSuite$test_foo [KO] * Test-suite of module test_nitunit4::test_nitunit4 [X. ] 2/3 test_nitunit4$TestTestSuite$test_bar [OK] * Test-suite of module test_nitunit4::test_nitunit4 [X.X] 3/3 test_nitunit4$TestTestSuite$test_baz [KO] * Test-suite of module test_nitunit4::test_nitunit4 [X.X] 3/3 -[KO] test_nitunit4$TestTestSuite$test_foo - test_nitunit4/test_nitunit4.nit:22,2--26,4: Runtime Error in file .nitunit/gen_test_nitunit4.nit - fun test_foo do - ^ +* Test-suite of module test_nitunit4::test_nitunit4 (3 tests) + +[KO] test_nitunit4$TestTestSuite$test_foo + test_nitunit4/test_nitunit4.nit:22,2--26,4: Runtime Error in file nitunit.out/gen_test_nitunit4.nit Output Before Test Tested method After Test Runtime error: Assert failed (test_nitunit4/test_nitunit4_base.nit:31) -[OK] test_nitunit4$TestTestSuite$test_bar -[KO] test_nitunit4$TestTestSuite$test_baz - test_nitunit4/test_nitunit4.nit:32,2--34,4: Difference with expected output: diff -u test_nitunit4/test_nitunit4.sav/test_baz.res .nitunit/gen_test_nitunit4_test_baz.out1 - fun test_baz do - ^ +[OK] test_nitunit4$TestTestSuite$test_bar +[KO] test_nitunit4$TestTestSuite$test_baz + test_nitunit4/test_nitunit4.nit:32,2--34,4: Difference with expected output: diff -u test_nitunit4/test_nitunit4.sav/test_baz.res nitunit.out/gen_test_nitunit4_test_baz.out1 Output Diff --- expected:test_nitunit4/test_nitunit4.sav/test_baz.res - +++ got:.nitunit/gen_test_nitunit4_test_baz.out1 + +++ got:nitunit.out/gen_test_nitunit4_test_baz.out1 @@ -1 +1,3 @@ -Bad result file +Before Test +Tested method +After Test -DocUnits: -No doc units found -Entities: 12; Documented ones: 0; With nitunits: 0; Failures: 0 - -TestSuites: -Class suites: 1; Test Cases: 3; Failures: 2 -Runtime Error in file .nitunit/gen_test_nitunit4.nitBefore Test +Docunits: Entities: 12; Documented ones: 0; With nitunits: 0 +Test suites: Classes: 1; Test Cases: 3; Failures: 2 +[FAILURE] 2/3 tests failed. +`nitunit.out` is not removed for investigation. +Runtime Error in file nitunit.out/gen_test_nitunit4.nitBefore Test Tested method After Test Runtime error: Assert failed (test_nitunit4/test_nitunit4_base.nit:31) Before Test Tested method After Test -Difference with expected output: diff -u test_nitunit4/test_nitunit4.sav/test_baz.res .nitunit/gen_test_nitunit4_test_baz.out1Diff +Difference with expected output: diff -u test_nitunit4/test_nitunit4.sav/test_baz.res nitunit.out/gen_test_nitunit4_test_baz.out1Diff --- expected:test_nitunit4/test_nitunit4.sav/test_baz.res -+++ got:.nitunit/gen_test_nitunit4_test_baz.out1 ++++ got:nitunit.out/gen_test_nitunit4_test_baz.out1 @@ -1 +1,3 @@ -Bad result file +Before Test