gojay

high performance JSON encoder/decoder with stream API for Golang
git clone git://git.lair.cx/gojay
Log | Files | Refs | README | LICENSE

commit 8c1466b1729193cb6d476eda713f92387ffbf186
parent 5dcfb64ffcaabc9f5815a3cd5df8d0d438204ca7
Author: francoispqt <francois@parquet.ninja>
Date:   Tue,  1 May 2018 22:20:45 +0800

fix conflicts

Diffstat:
Mencode_stream_test.go | 17-----------------
1 file changed, 0 insertions(+), 17 deletions(-)

diff --git a/encode_stream_test.go b/encode_stream_test.go @@ -139,23 +139,6 @@ func TestEncodeStreamSingleConsumerWriteError(t *testing.T) { assert.NotNil(t, enc.Err(), "enc.Err() should not be nil") } } -func TestEncodeStreamSingleConsumerNilValue(t *testing.T) { - expectedStr := `` - // create our writer - w := &TestWriter{target: 100, mux: &sync.RWMutex{}} - enc := Stream.NewEncoder(w).LineDelimited() - w.enc = enc - s := StreamChanObject(make(chan *testObject)) - go enc.EncodeStream(s) - go feedStreamNil(s, 100) - select { - case <-enc.Done(): - assert.Nil(t, enc.Err(), "enc.Err() should not be nil") - for _, b := range w.result { - assert.Equal(t, expectedStr, string(b), "every byte buffer should be equal to expected string") - } - } -} func TestEncodeStreamSingleConsumerCommaDelimited(t *testing.T) { expectedStr := `{"testStr":"","testInt":0,"testInt64":0,"testInt32":0,"testInt16":0,"testInt8":0,"testUint64":0,"testUint32":0,"testUint16":0,"testUint8":0,"testFloat64":0,"testFloat32":0,"testBool":false},`