From 2272a586552c28846c842df67f2ae195be3f857a Mon Sep 17 00:00:00 2001 From: "bclary@bclary.com" Date: Mon, 11 Feb 2008 14:22:02 -0800 Subject: [PATCH] JavaScript Tests - update test for bug 410571 --- js/tests/js1_7/decompilation/regress-410571.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/tests/js1_7/decompilation/regress-410571.js b/js/tests/js1_7/decompilation/regress-410571.js index 047a76910fe..f66a0bf3698 100644 --- a/js/tests/js1_7/decompilation/regress-410571.js +++ b/js/tests/js1_7/decompilation/regress-410571.js @@ -41,6 +41,8 @@ var BUGNUMBER = 410571; var summary = 'incorrect decompilation of last element of object literals'; var actual, expect; +actual = expect = 'PASSED'; + printBugNumber(BUGNUMBER); printStatus(summary); @@ -134,12 +136,12 @@ function checkItems(name, gen) for (var item in gen) { if (!test.generates[i](item)) - throw "wrong generated value (" + item + ") " + + actual = "wrong generated value (" + item + ") " + "for test " + name + ", item " + i; i++; } if (i !== test.generates.length) - throw "Didn't iterate all of test " + name; + actual = "Didn't iterate all of test " + name; } for (var i = 0, sz = tests.length; i < sz; i++) @@ -149,11 +151,9 @@ for (var i = 0, sz = tests.length; i < sz; i++) var fun = test.fun; checkItems(i, fun()); - var dec = fun.toString(); + var dec = '(' + fun.toString() + ')'; var rec = eval(dec); checkItems("recompiled " + i, rec()); } -expect = actual = "no exception thrown"; - reportCompare(expect, actual, summary);