1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-20 11:28:49 +02:00

fix go report card

This commit is contained in:
Tao Wen 2017-07-09 11:12:37 +08:00
parent 711f836582
commit 6d0e6f3733
2 changed files with 3 additions and 1 deletions

View File

@ -16,12 +16,13 @@ func Test_bind_api_demo(t *testing.T) {
} }
func Test_iterator_api_demo(t *testing.T) { func Test_iterator_api_demo(t *testing.T) {
should := require.New(t)
iter := ParseString(ConfigDefault, `[0,1,2,3]`) iter := ParseString(ConfigDefault, `[0,1,2,3]`)
total := 0 total := 0
for iter.ReadArray() { for iter.ReadArray() {
total += iter.ReadInt() total += iter.ReadInt()
} }
//fmt.Println(total) should.Equal(6, total)
} }
type People struct { type People struct {

View File

@ -142,6 +142,7 @@ func Test_encode_map_uint_keys(t *testing.T) {
should.Nil(err) should.Nil(err)
output, err := ConfigCompatibleWithStandardLibrary.MarshalToString(m) output, err := ConfigCompatibleWithStandardLibrary.MarshalToString(m)
should.Nil(err)
should.Equal(string(bytes), output) should.Equal(string(bytes), output)
} }