libf 1 月之前
父節點
當前提交
6164411f21
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      json/json_test.go

+ 21 - 0
json/json_test.go

@@ -0,0 +1,21 @@
+package json_test
+
+import (
+	"encoding/json"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+type Stru struct {
+	name string
+}
+
+func TestEmpty(t *testing.T) {
+	bs := []byte("")
+	var stru Stru
+	e := json.Unmarshal(bs, &stru)
+	if !assert.Nil(t, e) {
+		return
+	}
+}