1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-18 22:57:33 +02:00

wrap string

This commit is contained in:
Tao Wen
2017-01-26 16:41:49 +08:00
parent cf4113fc22
commit fa16f3c75c
3 changed files with 87 additions and 0 deletions

View File

@ -79,6 +79,12 @@ func Test_read_string_as_any(t *testing.T) {
should.Equal(123, any.ToInt())
}
func Test_wrap_string(t *testing.T) {
should := require.New(t)
any := WrapString("123")
should.Equal(123, any.ToInt())
}
func Test_write_string(t *testing.T) {
should := require.New(t)
str, err := MarshalToString("hello")