parser: Fix missing check for upper exponent (#665)

This commit is contained in:
Cameron Moore
2021-11-09 20:15:23 -06:00
committed by GitHub
parent f27a07d31a
commit 2dbd29a565
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -155,6 +155,11 @@ func TestUnmarshal_Floats(t *testing.T) {
input: `0e0`,
expected: 0.0,
},
{
desc: "float upper exponent zero",
input: `0E0`,
expected: 0.0,
},
{
desc: "float fractional with exponent",
input: `6.626e-34`,