Commit 45b33347 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Fixed tests on some old jscript versions.

parent 34d59949
......@@ -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],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment