1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00
This commit is contained in:
Tao Wen
2017-01-23 08:45:57 +08:00
parent b9fe012eea
commit 38d613acf2
3 changed files with 94 additions and 10 deletions

View File

@ -20,6 +20,13 @@ func Test_false(t *testing.T) {
should.False(iter.ReadBool())
}
func Test_read_bool_as_any(t *testing.T) {
should := require.New(t)
any, err := UnmarshalAnyFromString("true")
should.Nil(err)
should.True(any.ToBool())
}
func Test_write_true_false(t *testing.T) {
should := require.New(t)
buf := &bytes.Buffer{}