mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
[JSCRIPT_WINETEST] Sync with Wine Staging 3.9. CORE-14656
This commit is contained in:
parent
3f071cc527
commit
6b881f6502
2 changed files with 19 additions and 0 deletions
|
@ -408,6 +408,12 @@ ok(str.toString() === "", "str.toString() = " + str.toString());
|
|||
var str = new String("test", "abc");
|
||||
ok(str.toString() === "test", "str.toString() = " + str.toString());
|
||||
|
||||
str = new String("test");
|
||||
ok(str.length === 4, "str.length = " + str.length);
|
||||
str.length = 3;
|
||||
str.length = 5;
|
||||
ok(str.length === 4, "str.length = " + str.length);
|
||||
|
||||
var strObj = new Object();
|
||||
strObj.toString = function() { return "abcd" };
|
||||
strObj.substr = String.prototype.substr;
|
||||
|
@ -1810,6 +1816,7 @@ ok(isNaN(tmp), "Math.tan(-Infinity) is not NaN");
|
|||
return;
|
||||
|
||||
var stringify_tests = [
|
||||
[[], undefined],
|
||||
[[true], "true"],
|
||||
[[false], "false"],
|
||||
[[null], "null"],
|
||||
|
@ -1836,6 +1843,9 @@ ok(isNaN(tmp), "Math.tan(-Infinity) is not NaN");
|
|||
"["+i+"] stringify(" + stringify_tests[i][0] + ") returned " + s + " expected " + stringify_tests[i][1]);
|
||||
}
|
||||
|
||||
s = JSON.stringify();
|
||||
ok(s === undefined, "stringify() returned " + s + " expected undefined");
|
||||
|
||||
s = JSON.stringify(testObj);
|
||||
ok(s === undefined || s === "undefined" /* broken on some old versions */,
|
||||
"stringify(testObj) returned " + s + " expected undfined");
|
||||
|
|
|
@ -48,6 +48,9 @@ tmp = 07777777777777777777777;
|
|||
ok(typeof(tmp) === "number" && tmp > 0xffffffff, "tmp = " + tmp);
|
||||
tmp = 07777777779777777777777;
|
||||
ok(typeof(tmp) === "number" && tmp > 0xffffffff, "tmp = " + tmp);
|
||||
ok(0xffffffff === 4294967295, "0xffffffff = " + 0xffffffff);
|
||||
tmp = 0x10000000000000000000000000000000000000000000000000000000000000000;
|
||||
ok(tmp === Math.pow(2, 256), "0x1000...00 != 2^256");
|
||||
|
||||
ok(1 !== 2, "1 !== 2 is false");
|
||||
ok(null !== undefined, "null !== undefined is false");
|
||||
|
@ -632,6 +635,12 @@ tmp = 10;
|
|||
ok((tmp |= 0x10) === 26, "tmp(10) |= 0x10 !== 26");
|
||||
ok(getVT(tmp) === "VT_I4", "getVT(tmp |= 10) = " + getVT(tmp));
|
||||
|
||||
tmp = (123 * Math.pow(2,32) + 2) | 0;
|
||||
ok(tmp === 2, "123*2^32+2 | 0 = " + tmp);
|
||||
|
||||
tmp = (-123 * Math.pow(2,32) + 2) | 0;
|
||||
ok(tmp === 2, "123*2^32+2 | 0 = " + tmp);
|
||||
|
||||
tmp = 3 & 5;
|
||||
ok(tmp === 1, "3 & 5 !== 1");
|
||||
ok(getVT(tmp) === "VT_I4", "getVT(3|5) = " + getVT(tmp));
|
||||
|
|
Loading…
Reference in a new issue