X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=rostests%2Fwinetests%2Fjscript%2Fapi.js;fp=rostests%2Fwinetests%2Fjscript%2Fapi.js;h=f3700987a339d143ef7212672f91f524709b1ced;hp=16fba150a87f3acfe8d5169a4256905e9aeb641c;hb=1d451b9296defd6173b3aff49fb89106d8b96310;hpb=a95d7474d93cc8bb2af0373926cd247c721f24ac diff --git a/rostests/winetests/jscript/api.js b/rostests/winetests/jscript/api.js index 16fba150a87..f3700987a33 100644 --- a/rostests/winetests/jscript/api.js +++ b/rostests/winetests/jscript/api.js @@ -519,6 +519,9 @@ ok(tmp === 1, "Math.round(true) = " + tmp); tmp = Math.round(1.1, 3, 4); ok(tmp === 1, "Math.round(1.1, 3, 4) = " + tmp); +tmp = Math.round(); +ok(isNaN(tmp), "Math.round() is not NaN"); + tmp = Math.ceil(0.5); ok(tmp === 1, "Math.ceil(0.5) = " + tmp); @@ -585,6 +588,14 @@ ok(tmp === 2, "Math.pow(2, 2) = " + tmp); tmp = Math.pow(2, 2, 3); ok(tmp === 4, "Math.pow(2, 2, 3) = " + tmp); +tmp = Math.random(); +ok(typeof(tmp) == "number", "typeof(tmp) = " + typeof(tmp)); +ok(0 <= tmp && tmp <= 1, "Math.random() = " + tmp); + +tmp = Math.random(100); +ok(typeof(tmp) == "number", "typeof(tmp) = " + typeof(tmp)); +ok(0 <= tmp && tmp <= 1, "Math.random(100) = " + tmp); + var func = function (a) { var a = 1; if(a) return;