gjs r50 - trunk/test/js/modules



Author: jobi
Date: Fri Oct 24 15:16:16 2008
New Revision: 50
URL: http://svn.gnome.org/viewvc/gjs?rev=50&view=rev

Log:
in jsUnit.js:bigtestRun(), log the names of failing tests, since they'll have scrolled off the to

Patch by Havoc Pennington

Modified:
   trunk/test/js/modules/jsUnit.js

Modified: trunk/test/js/modules/jsUnit.js
==============================================================================
--- trunk/test/js/modules/jsUnit.js	(original)
+++ trunk/test/js/modules/jsUnit.js	Fri Oct 24 15:16:16 2008
@@ -445,6 +445,7 @@
 // calls to setUp() and tearDown()
 function gjstestRun() {
   var rv = 0;
+  var failures = [];
 
   for (propName in window) {
     if (!propName.match(/^test\w+/))
@@ -475,6 +476,7 @@
         // whole test as failed
         log(result);
         rv = 1;
+        failures.push(propName);
       }
       else {
         // unexpected error, let the shell handle it
@@ -484,6 +486,11 @@
     tearDown();
   }
 
+  if (failures.length > 0) {
+    log(failures.length + " tests failed in this file");
+    log("Failures were: " + failures.join(", "));
+  }
+
   // if gjstestRun() is the last call in a file, this becomes the
   // exit code of the test program, so 0 = success, 1 = failed
   return rv;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]