diff --git a/js/src/trace-test.js b/js/src/trace-test.js index f389f23211c3..cd93508c9c3e 100644 --- a/js/src/trace-test.js +++ b/js/src/trace-test.js @@ -1,7 +1,12 @@ +var fails = [], passes=[]; + function test(desc, actual, expected) { - if (expected == actual) + if (expected == actual) { + passes.push(desc); return print(desc, ": passed"); + } + fails.push(desc); print(desc, ": FAILED: expected", typeof(expected), "(", expected, ") != actual", typeof(actual), "(", actual, ")"); } @@ -234,8 +239,13 @@ function call() q3 += glob_f1(); q4 += o.f(); q5 += glob_f2(); - } + } var ret = [q1, q2, q3, q4, q5]; return ret; } test("call", call(), "100,100,100,100,100"); + +if (passes.length) + print("pass:", passes.join(",")); +if (fails.length) + print("FAIL:", fails.join(","));