1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-12 22:47:42 +02:00
This commit is contained in:
Tao Wen
2018-02-24 22:04:41 +08:00
parent 8d6662b81b
commit fff342fd04
72 changed files with 165 additions and 176 deletions

View File

@ -1,13 +1,13 @@
package test
import (
"bytes"
"encoding/json"
"fmt"
"testing"
"github.com/json-iterator/go"
"github.com/stretchr/testify/require"
"strconv"
"bytes"
"github.com/json-iterator/go"
"encoding/json"
"testing"
)
func Test_read_float(t *testing.T) {
@ -50,7 +50,6 @@ func Test_read_float(t *testing.T) {
}
}
func Test_write_float32(t *testing.T) {
vals := []float32{0, 1, -1, 99, 0xff, 0xfff, 0xffff, 0xfffff, 0xffffff, 0x4ffffff, 0xfffffff,
-0x4ffffff, -0xfffffff, 1.2345, 1.23456, 1.234567, 1.001}
@ -127,4 +126,4 @@ func Test_write_float64(t *testing.T) {
stream = jsoniter.NewStream(jsoniter.ConfigDefault, nil, 0)
stream.WriteFloat64(float64(0.0000001))
should.Equal("1e-07", string(stream.Buffer()))
}
}