Updates the package and fixes a test that depended on the old behavior of Write() being equivalent to Reset()+Write() which is no longer the case. The scanner already did resets after each block write, so this is fine.
This commit is contained in:
@@ -144,14 +144,13 @@ func TestAdler32Variants(t *testing.T) {
|
||||
|
||||
windowSize := 128
|
||||
|
||||
hf2.Reset()
|
||||
|
||||
hf3 := rollingAdler32.New()
|
||||
hf3.Write(data[:windowSize])
|
||||
|
||||
for i := windowSize; i < len(data); i++ {
|
||||
if i%windowSize == 0 {
|
||||
// let the reference function catch up
|
||||
hf2.Reset()
|
||||
hf2.Write(data[i-windowSize : i])
|
||||
|
||||
// verify that they are in sync with the rolling function
|
||||
|
||||
Reference in New Issue
Block a user