Browse Source

improve test

Jason Toffaletti 8 years ago
parent
commit
48cc4d965a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      jsoniter_interface_test.go

+ 2 - 1
jsoniter_interface_test.go

@@ -389,7 +389,8 @@ func Test_omitempty_nil_nonempty_interface(t *testing.T) {
 	should.Equal(nil, err)
 	should.Equal(string(js), str)
 
-	err = Unmarshal(js, &obj)
+	obj.Field = MyString("hello")
+	err = UnmarshalFromString(`{"field":null}`, &obj)
 	should.Equal(nil, err)
 	should.Equal(nil, obj.Field)
 }