Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(490)

Unified Diff: src/pkg/strconv/atof_test.go

Issue 3359041: code review 3359041: strconv: Atof on Infs and NaNs (Closed)
Patch Set: code review 3359041: strconv: Atof on Infs and NaNs Created 14 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/strconv/atof.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/strconv/atof_test.go
===================================================================
--- a/src/pkg/strconv/atof_test.go
+++ b/src/pkg/strconv/atof_test.go
@@ -37,6 +37,16 @@
{"1e-20", "1e-20", nil},
{"625e-3", "0.625", nil},
+ // NaNs
+ {"nan", "NaN", nil},
+ {"NaN", "NaN", nil},
+ {"NAN", "NaN", nil},
+
+ // Infs
+ {"inf", "+Inf", nil},
+ {"-Inf", "-Inf", nil},
+ {"+INF", "+Inf", nil},
+
// largest float64
{"1.7976931348623157e308", "1.7976931348623157e+308", nil},
{"-1.7976931348623157e308", "-1.7976931348623157e+308", nil},
« no previous file with comments | « src/pkg/strconv/atof.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b