remove ccirrelo/supervisor, update

everything seems to work even though sirupsen is upper case?

:cyfap:
This commit is contained in:
Reed Allman
2017-09-05 11:36:47 -07:00
parent 78ba35fb23
commit 27e43c5d94
397 changed files with 13691 additions and 8828 deletions

View File

@@ -1,6 +1,7 @@
package jsoniter
import (
"bytes"
"encoding/json"
"github.com/stretchr/testify/require"
"io"
@@ -98,3 +99,34 @@ func Test_invalid_float(t *testing.T) {
})
}
}
func Test_chan(t *testing.T) {
t.Skip("do not support chan")
type TestObject struct {
MyChan chan bool
MyField int
}
should := require.New(t)
obj := TestObject{}
str, err := json.Marshal(obj)
should.Nil(err)
should.Equal(``, str)
}
func Test_invalid_number(t *testing.T) {
type Message struct {
Number int `json:"number"`
}
obj := Message{}
decoder := ConfigCompatibleWithStandardLibrary.NewDecoder(bytes.NewBufferString(`{"number":"5"}`))
err := decoder.Decode(&obj)
invalidStr := err.Error()
result, err := ConfigCompatibleWithStandardLibrary.Marshal(invalidStr)
should := require.New(t)
should.Nil(err)
result2, err := json.Marshal(invalidStr)
should.Nil(err)
should.Equal(string(result2), string(result))
}