github.com/vicanso/pike@v1.0.1-0.20210630235453-9099e041f6ec/compress/lz4_test.go (about)

     1  package compress
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestDoLZ4Decode(t *testing.T) {
    10  	assert := assert.New(t)
    11  	data := compressTestData
    12  	result, err := doLZ4Encode(data, 0)
    13  	assert.Nil(err)
    14  	assert.NotNil(result)
    15  	assert.NotEqual(data, result)
    16  
    17  	result, err = doLZ4Decode(result)
    18  	assert.Nil(err)
    19  	assert.Equal(data, result)
    20  }