diff options
author | Omair Majid <[email protected]> | 2011-03-10 11:10:37 -0500 |
---|---|---|
committer | Omair Majid <[email protected]> | 2011-03-10 11:10:37 -0500 |
commit | e87c1ad906657f613469e34ee16d5bd2d4e78032 (patch) | |
tree | efb1eba3bc625297f7f402a0c07c023da88fcda4 /tests/netx | |
parent | 6ff243cfc167e12284139913ddae9d274da34744 (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.js | 11 |
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++; } } |