Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
guonaihong committed May 17, 2024
1 parent 837e5e6 commit 1702051
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deflate/compression_decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestDecompressNoContextTakeover(t *testing.T) {
}
// 压缩下一段数据
var encode *CompressContextTakeover
gotPayload, err := encode.Compress(&tt.args.payload)
gotPayload, err := encode.Compress(&tt.args.payload, 0)
if (err != nil) != tt.wantErr {
t.Errorf("CompressNoContextTakeover() error = %v, wantErr %v", err, tt.wantErr)
return
Expand Down Expand Up @@ -134,7 +134,7 @@ func TestDecompressNoContextTakeover2(t *testing.T) {
for i := 0; i < tt.loop; i++ {
// 压缩下一段数据
var encode *CompressContextTakeover
gotPayload, err := encode.Compress(&needData)
gotPayload, err := encode.Compress(&needData, 0)
if (err != nil) != tt.wantErr {
t.Errorf("CompressNoContextTakeover() error = %v, wantErr %v", err, tt.wantErr)
return
Expand Down
1 change: 0 additions & 1 deletion deflate/compression_encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func (e *CompressContextTakeover) Compress(payload *[]byte, bit uint8) (encodePa

var dict []byte
if e != nil {
bit = e.bit
dict = e.dict.GetData()
}
w, p := newCompressContextTakeover(nil, DefaultCompressionLevel, bit)
Expand Down
2 changes: 1 addition & 1 deletion deflate/compression_encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestEnCompressContextTakeover_Compress(t *testing.T) {
t.Errorf("NewCompressContextTakeover() error = %v, wantErr %v", err, tt.wantErr)
return
}
gotEncodePayload, err := e.Compress(&tt.args.payload)
gotEncodePayload, err := e.Compress(&tt.args.payload, 0)
if (err != nil) != tt.wantErr {
t.Errorf("CompressContextTakeover.Compress() error = %v, wantErr %v", err, tt.wantErr)
return
Expand Down

0 comments on commit 1702051

Please sign in to comment.