Skip to content

Commit a473c12

Browse files
committed
Add test for out of range float64
1 parent b535ff8 commit a473c12

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

decode_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ func TestDecodeErrors(t *testing.T) {
200200
`V.N = 999999999999999`,
201201
`toml: line 1 (last key "V.N"): 999999999999999 is out of the safe float32 range`,
202202
},
203+
{
204+
&struct{ F float64 }{},
205+
`f = 999999e999999`,
206+
`toml: line 1 (last key "f"): 999999e999999 is out of range for float64`,
207+
},
203208
{
204209
&struct{ V struct{ N string } }{},
205210
`V.N = 5`,

0 commit comments

Comments
 (0)