aboutsummaryrefslogtreecommitdiffstats
path: root/tests/netx
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2011-03-10 11:10:37 -0500
committerOmair Majid <[email protected]>2011-03-10 11:10:37 -0500
commite87c1ad906657f613469e34ee16d5bd2d4e78032 (patch)
treeefb1eba3bc625297f7f402a0c07c023da88fcda4 /tests/netx
parent6ff243cfc167e12284139913ddae9d274da34744 (diff)
Make output of PAC function tests more jtreg-like to help the buildbot
The buildbot already has support for parsing the results of jtreg tests; this changeset makes the output of PAC function tests more like jtreg's output. 2011-03-10 Omair Majid <[email protected]> * tests/netx/pac/pac-funcs-test.js (main): Make test summary output more jtreg-like. (runTests): Change test output format to be more jtreg-like.
Diffstat (limited to 'tests/netx')
-rw-r--r--tests/netx/pac/pac-funcs-test.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/netx/pac/pac-funcs-test.js b/tests/netx/pac/pac-funcs-test.js
index 110b60c..f14efdd 100644
--- a/tests/netx/pac/pac-funcs-test.js
+++ b/tests/netx/pac/pac-funcs-test.js
@@ -25,17 +25,15 @@ function main() {
testDateRange();
testTimeRange();
- java.lang.System.out.println(testsFailed + " of " + (testsFailed + testsPassed) + " tests failed");
+ java.lang.System.out.println("Test results: passed: " + testsPassed + "; failed: " + testsFailed + ";");
}
function runTests(name, tests) {
- java.lang.System.out.println("Testing: " + name.name);
var undefined_var;
for ( var i = 0; i < tests.length; i++) {
- java.lang.System.out.print("Test " + (i + 1) + ": ");
var expectedVal = tests[i][0];
var args = tests[i].slice(1);
var returnVal;
@@ -45,12 +43,11 @@ function runTests(name, tests) {
returnVal = e;
}
if (returnVal === expectedVal) {
- java.lang.System.out.println("Passed.");
+ java.lang.System.out.println("Passed: " + name.name + "(" + args.join(", ") + ")");
testsPassed++;
} else {
- java.lang.System.out.println("FAILED.");
- java.lang.System.out.println(name.name + "(" + args.join(", ") + ")");
- java.lang.System.out.println("Expected '" + expectedVal + "' but got '" + returnVal + "'");
+ java.lang.System.out.println("FAILED: " + name.name + "(" + args.join(", ") + ")");
+ java.lang.System.out.println(" Expected '" + expectedVal + "' but got '" + returnVal + "'");
testsFailed++;
}
}