You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-12-20 23:30:38 +02:00
Any Get will never return nil
This commit is contained in:
@@ -110,6 +110,13 @@ func Test_read_int64_as_any(t *testing.T) {
|
||||
should.True(any.ToBool())
|
||||
}
|
||||
|
||||
func Test_int_lazy_any_get(t *testing.T) {
|
||||
should := require.New(t)
|
||||
any, err := UnmarshalAnyFromString("1234")
|
||||
should.Nil(err)
|
||||
should.Equal(Invalid, any.Get(1, "2").ValueType())
|
||||
}
|
||||
|
||||
func Test_wrap_int(t *testing.T) {
|
||||
should := require.New(t)
|
||||
str, err := MarshalToString(WrapInt64(100))
|
||||
|
||||
Reference in New Issue
Block a user