Skip to content

Commit

Permalink
testCompressDecompress
Browse files Browse the repository at this point in the history
  • Loading branch information
ungerik committed Jan 14, 2025
1 parent d9a07fd commit 5f4c15c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bytes_test.go
Original file line number Diff line number Diff line change
@@ -97,17 +97,17 @@ func Test_BytesDecodeHex(t *testing.T) {
func testCompressDecompress(t *testing.T,
compressFunc func([]byte) []byte,
decompressFunc func([]byte) []byte) {
testFn := func(testData []byte) {
testFn := func(t *testing.T, testData []byte) {
compressedData := compressFunc(testData)
uncompressedData := decompressFunc(compressedData)
if !bytes.Equal(testData, uncompressedData) {
t.FailNow()
}
}

go testFn([]byte("hello123"))
go testFn([]byte("gopher456"))
go testFn([]byte("dry789"))
testFn(t, []byte("hello123"))
testFn(t, []byte("gopher456"))
testFn(t, []byte("dry789"))
}

func Test_BytesDeflateInflate(t *testing.T) {

0 comments on commit 5f4c15c

Please sign in to comment.