github.com/vicanso/pike@v1.0.1-0.20210630235453-9099e041f6ec/compress/snappy_test.go (about) 1 package compress 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestDoSnappyDecode(t *testing.T) { 10 assert := assert.New(t) 11 data := compressTestData 12 dst := doSnappyEncode(data) 13 assert.NotNil(dst) 14 assert.NotEqual(data, dst) 15 16 buf, err := doSnappyDecode(dst) 17 assert.Nil(err) 18 assert.Equal(data, buf) 19 }