mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
18 lines
451 B
JavaScript
18 lines
451 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
assert(Math.cos(0) === 1);
|
|
assert(Math.cos(null) === 1);
|
|
assert(Math.cos('') === 1);
|
|
assert(Math.cos([]) === 1);
|
|
assert(Math.cos(Math.PI) === -1);
|
|
assert(isNaN(Math.cos()));
|
|
assert(isNaN(Math.cos(undefined)));
|
|
assert(isNaN(Math.cos([1, 2, 3])));
|
|
assert(isNaN(Math.cos({})));
|
|
assert(isNaN(Math.cos("foo")));
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|