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:
parent
9e7dcaa106
commit
003741db1c
Notes:
sideshowbarker
2024-07-19 07:52:45 +09:00
Author: https://github.com/awesomekling
Commit: 003741db1c
3 changed files with 30 additions and 0 deletions
12
Libraries/LibJS/Tests/Math.min.js
vendored
Normal file
12
Libraries/LibJS/Tests/Math.min.js
vendored
Normal 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");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue