From b986d86f268419f16cd9a67ced8f5f4f67af4482 Mon Sep 17 00:00:00 2001 From: eruca <nickwill1984@126.com> Date: Sat, 11 Mar 2017 18:19:39 +0800 Subject: [PATCH] add test --- jsoniter_reflect_struct_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsoniter_reflect_struct_test.go b/jsoniter_reflect_struct_test.go index 78459f3..703c857 100644 --- a/jsoniter_reflect_struct_test.go +++ b/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) -} \ No newline at end of file +}