Skip to content

Commit

Permalink
fixe: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Apr 19, 2024
1 parent 01d7634 commit 14a8f50
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func (s *Sync) Delta(sig []Table, reader *bufio.Reader) Delta {
// Generate new block with calculated range positions for diffing
newBlock := s.block(index, tmpLitMatches)
delta.Add(index, newBlock) // Add new block to delta matches

// Clear garbage collectable
tmpLitMatches = tmpLitMatches[:0] // clear tmp literal matches
weak = adler32.New() // replace weak adler object
Expand Down
2 changes: 1 addition & 1 deletion sync/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func TestDetectChunkShifted(t *testing.T) {
o := []byte("i am here guys how are you doing this is a small test for chunk split and rolling hash")
c := []byte("i am here guys how are you doing test for chunk split and rolling hash")
expect := map[int][]byte{
1: []byte("i am here guys h"), // Match first block change
1: []byte(" m here guys h"), // Match first block change
3: []byte(" "), // Match third block change
}

Expand Down

0 comments on commit 14a8f50

Please sign in to comment.