1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibJS: Add Math.min()

This commit is contained in:
Andreas Kling 2020-04-05 18:55:46 +02:00
parent 9e7dcaa106
commit 003741db1c
Notes: sideshowbarker 2024-07-19 07:52:45 +09:00
3 changed files with 30 additions and 0 deletions

12
Libraries/LibJS/Tests/Math.min.js vendored Normal file
View file

@ -0,0 +1,12 @@
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.max(NaN)));
assert(isNaN(Math.max("String", 1)));
console.log("PASS");
} catch {
console.log("FAIL");
}