Skip to content

Commit

Permalink
Fix skipped test case
Browse files Browse the repository at this point in the history
  • Loading branch information
cespare committed Dec 5, 2020
1 parent fd5c34b commit 1a548c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xxhash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ func TestAll(t *testing.T) {
0x02a2e85470d6fd96,
},
} {
for chunkSize := 1; chunkSize <= len(tt.input); chunkSize++ {
lastChunkSize := len(tt.input)
if lastChunkSize == 0 {
lastChunkSize = 1
}
for chunkSize := 1; chunkSize <= lastChunkSize; chunkSize++ {
name := fmt.Sprintf("%s,chunkSize=%d", tt.name, chunkSize)
t.Run(name, func(t *testing.T) {
testDigest(t, tt.input, chunkSize, tt.want)
Expand Down

0 comments on commit 1a548c8

Please sign in to comment.