mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 10:22:13 +00:00
LibJS: Handle Infinity in Value::to_number()
This commit is contained in:
parent
477bacddad
commit
f226746394
3 changed files with 17 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue