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

LibJS: Handle Infinity in Value::to_number()

This commit is contained in:
Linus Groh 2020-04-12 13:06:34 +01:00 committed by Andreas Kling
parent 477bacddad
commit f226746394
Notes: sideshowbarker 2024-07-19 07:41:11 +09:00
3 changed files with 17 additions and 0 deletions

View file

@ -22,6 +22,12 @@ try {
// FIXME: returns NaN
// assert(+"1.23" === 1.23)
// assert(-"1.23" === -1.23)
assert(+"Infinity" === Infinity);
assert(+"+Infinity" === Infinity);
assert(+"-Infinity" === -Infinity);
assert(-"Infinity" === -Infinity);
assert(-"+Infinity" === -Infinity);
assert(-"-Infinity" === Infinity);
assert(isNaN(+undefined));
assert(isNaN(-undefined));