Nice/src/nice/tools/unit/console main.nice,1.6,1.7
Daniel Bonniot <[email protected]> Mon, 18 Apr 2005 18:03:28 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/src/nice/tools/unit/console
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23650/src/nice/tools/unit/console
Modified Files:
main.nice
Log Message:
Report number of failures/tests at the end of a run.
Index: main.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/console/main.nice,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** main.nice 8 Apr 2005 08:26:57 -0000 1.6
--- main.nice 18 Apr 2005 18:03:25 -0000 1.7
***************
*** 54,57 ****
--- 54,59 ----
System.err.println("Package "pkg" was not found");
});
+
+ println(""listener.nFailures"/"listener.nTests" tests failed");
}
***************
*** 66,73 ****
class Listener implements TestListener
{
start(test) = println(test);
! end(test) {}
failure(test, cause, loader)
{
println("Test failed:\n " + cause);
if (!(iterLocations(test, cause, (?String file, String method, int line) =>
--- 68,79 ----
class Listener implements TestListener
{
+ int nTests = 0;
+ int nFailures = 0;
+
start(test) = println(test);
! end(test) { nTests++; }
failure(test, cause, loader)
{
+ nFailures++;
println("Test failed:\n " + cause);
if (!(iterLocations(test, cause, (?String file, String method, int line) =>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click