Archived
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:
1 parent
d1704d5304
commit
c0a26c918a
8 files changed
+172
-107
No files matched your search
@@ -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