blob: 7b01e441028dc60b92b14be230dede3c1acb6ceb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
load("test-common.js");
try {
assert(Math.max.length === 2);
assert(Math.max() === -Infinity);
assert(Math.max(1) === 1);
assert(Math.max(2, 1) === 2);
assert(Math.max(1, 2, 3) === 3);
assert(isNaN(Math.max(NaN)));
assert(isNaN(Math.max("String", 1)));
console.log("PASS");
} catch {
console.log("FAIL");
}
|