From 21cbb90960f9f724220ab25847678a25fb825999 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Tue, 16 Aug 2016 13:02:52 +0200 Subject: [PATCH] test: 100% coverage for blocks/blocksutil This was easy. License: MIT Signed-off-by: Jakub Sztandera --- blocks/blocksutil/block_generator_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 blocks/blocksutil/block_generator_test.go diff --git a/blocks/blocksutil/block_generator_test.go b/blocks/blocksutil/block_generator_test.go new file mode 100644 index 00000000000..014beee4b67 --- /dev/null +++ b/blocks/blocksutil/block_generator_test.go @@ -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") + } + } + } + } +}