eruca 8 年之前
父节点
当前提交
b986d86f26
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      jsoniter_reflect_struct_test.go

+ 2 - 1
jsoniter_reflect_struct_test.go

@@ -165,10 +165,11 @@ func Test_omit_empty(t *testing.T) {
 	type TestObject struct {
 		Field1 string `json:"field-1,omitempty"`
 		Field2 string `json:"field-2,omitempty"`
+		Field3 string `json:"field-3,omitempty"`
 	}
 	obj := TestObject{}
 	obj.Field2 = "hello"
 	str, err := MarshalToString(&obj)
 	should.Nil(err)
 	should.Equal(`{"field-2":"hello"}`, str)
-}
+}