summaryrefslogtreecommitdiff
path: root/compat/json/compat_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'compat/json/compat_test.go')
-rw-r--r--compat/json/compat_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/json/compat_test.go b/compat/json/compat_test.go
index d989a4d..128bd1b 100644
--- a/compat/json/compat_test.go
+++ b/compat/json/compat_test.go
@@ -46,6 +46,7 @@ func TestCompatCompact(t *testing.T) {
"trunc": {In: `{`, Out: ``, Err: `unexpected end of JSON input`},
"object": {In: `{}`, Out: `{}`},
"non-utf8": {In: "\"\x85\xcd\"", Out: "\"\x85\xcd\""},
+ "float": {In: `1.200e003`, Out: `1.200e003`},
}
for tcName, tc := range testcases {
tc := tc
@@ -75,6 +76,7 @@ func TestCompatIndent(t *testing.T) {
"trunc": {In: `{`, Out: ``, Err: `unexpected end of JSON input`},
"object": {In: `{}`, Out: `{}`},
"non-utf8": {In: "\"\x85\xcd\"", Out: "\"\x85\xcd\""},
+ "float": {In: `1.200e003`, Out: `1.200e003`},
}
for tcName, tc := range testcases {
tc := tc
@@ -103,6 +105,7 @@ func TestCompatMarshal(t *testing.T) {
testcases := map[string]testcase{
"non-utf8": {In: "\x85\xcd", Out: "\"\\ufffd\\ufffd\""},
"urc": {In: "\ufffd", Out: "\"\ufffd\""},
+ "float": {In: 1.2e3, Out: `1200`},
}
for tcName, tc := range testcases {
tc := tc