Skip to content

Commit

Permalink
Merge pull request #3090 from ipfs/feat/test-cover-blocks-util
Browse files Browse the repository at this point in the history
test: 100% coverage for blocks/blocksutil
  • Loading branch information
whyrusleeping authored Aug 16, 2016
2 parents 4eb7c6c + 21cbb90 commit 1d0c00e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions blocks/blocksutil/block_generator_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package blocksutil

import "testing"

func TestBlocksAreDifferent(t *testing.T) {
gen := NewBlockGenerator()

blocks := gen.Blocks(100)

for i, block1 := range blocks {
for j, block2 := range blocks {
if i != j {
if block1.String() == block2.String() {
t.Error("Found duplicate blocks")
}
}
}
}
}

0 comments on commit 1d0c00e

Please sign in to comment.