lib/scanner, vendor: Update github.com/chmduquesne/rollinghash (fixes #5334) (#5335)

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:
Jakob Borg
2018-11-22 08:50:06 +01:00
committed by GitHub
parent d1704d5304
commit c0a26c918a
8 changed files with 172 additions and 107 deletions

View File

@@ -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