1
0
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:
Robert Krimen
2012-11-06 11:06:45 -08:00
parent 75ea5e32a4
commit 26f8a53978
4 changed files with 11 additions and 1 deletions

View File

@@ -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")
}