瀏覽代碼

fix go report card

Tao Wen 8 年之前
父節點
當前提交
6d0e6f3733
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 1
      jsoniter_demo_test.go
  2. 1 0
      jsoniter_map_test.go

+ 2 - 1
jsoniter_demo_test.go

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

+ 1 - 0
jsoniter_map_test.go

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