summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests/Math.min.js
blob: fbe26bd27b3eb7dc2ea88d2fcfc9e15d48bbca49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
load("test-common.js");

try {
    assert(Math.min.length === 2);
    assert(Math.min(1) === 1);
    assert(Math.min(2, 1) === 1);
    assert(Math.min(1, 2, 3) === 1);
    assert(isNaN(Math.min(NaN)));
    assert(isNaN(Math.min("String", 1)));

    console.log("PASS");
} catch {
    console.log("FAIL");
}