Skip to content

Commit 48cc4d9

Browse files
committed
improve test
1 parent c59c42f commit 48cc4d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jsoniter_interface_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ func Test_omitempty_nil_nonempty_interface(t *testing.T) {
389389
should.Equal(nil, err)
390390
should.Equal(string(js), str)
391391

392-
err = Unmarshal(js, &obj)
392+
obj.Field = MyString("hello")
393+
err = UnmarshalFromString(`{"field":null}`, &obj)
393394
should.Equal(nil, err)
394395
should.Equal(nil, obj.Field)
395396
}

0 commit comments

Comments
 (0)