mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
remove ccirrelo/supervisor, update
everything seems to work even though sirupsen is upper case? :cyfap:
This commit is contained in:
32
vendor/github.com/json-iterator/go/jsoniter_invalid_test.go
generated
vendored
32
vendor/github.com/json-iterator/go/jsoniter_invalid_test.go
generated
vendored
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user