Module: wine Branch: master Commit: 45b33347572aec824f1eff83edf6bf9ca53a10d8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=45b33347572aec824f1eff83ed...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Jan 29 16:15:25 2016 +0100
jscript: Fixed tests on some old jscript versions.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/jscript/tests/api.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index eb33675..dacacc4 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1780,7 +1780,6 @@ ok(isNaN(tmp), "Math.tan(-Infinity) is not NaN"); [[NaN], "null"], [[Infinity], "null"], [[-Infinity], "null"], - [[undefined], undefined], [[{prop1: true, prop2: "string"}], "{"prop1":true,"prop2":"string"}"], [[{prop1: true, prop2: testObj, prop3: undefined}], "{"prop1":true}"], [[{prop1: true, prop2: {prop: "string"}},undefined," "], @@ -1795,11 +1794,16 @@ ok(isNaN(tmp), "Math.tan(-Infinity) is not NaN"); for(i=0; i < stringify_tests.length; i++) { s = JSON.stringify.apply(null, stringify_tests[i][0]); ok(s === stringify_tests[i][1], - "stringify(" + stringify_tests[i][0] + ") returned " + s + " expected " + stringify_tests[i][1]); + "["+i+"] stringify(" + stringify_tests[i][0] + ") returned " + s + " expected " + stringify_tests[i][1]); }
s = JSON.stringify(testObj); - ok(s === undefined, "stringify(testObj) returned " + s); + ok(s === undefined || s === "undefined" /* broken on some old versions */, + "stringify(testObj) returned " + s + " expected undfined"); + + s = JSON.stringify(undefined); + ok(s === undefined || s === "undefined" /* broken on some old versions */, + "stringify(undefined) returned " + s + " expected undfined");
var parse_tests = [ ["true", true],