1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 06:25:01 +00:00
serenity/Libraries/LibJS/Tests/builtins/Math/Math.tan.js
2020-07-03 19:30:13 +02:00

18 lines
465 B
JavaScript

load("test-common.js");
try {
assert(Math.tan(0) === 0);
assert(Math.tan(null) === 0);
assert(Math.tan('') === 0);
assert(Math.tan([]) === 0);
assert(Math.ceil(Math.tan(Math.PI / 4)) === 1);
assert(isNaN(Math.tan()));
assert(isNaN(Math.tan(undefined)));
assert(isNaN(Math.tan([1, 2, 3])));
assert(isNaN(Math.tan({})));
assert(isNaN(Math.tan("foo")));
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}