mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Accept out-of-range +/-Infinity (instead of NaNing)
This commit is contained in:
@@ -2086,3 +2086,9 @@ func TestDotMember(t *testing.T) {
|
||||
test(`abc.ghi`, "undefined")
|
||||
}
|
||||
|
||||
func Test_stringToFloat(t *testing.T) {
|
||||
Terst(t)
|
||||
|
||||
Is(stringToFloat("10e10000"), math.Inf(1))
|
||||
Is(stringToFloat("10e10_."), "NaN")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user