diff options
Diffstat (limited to 'core/types/block_test.go')
-rw-r--r-- | core/types/block_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/types/block_test.go b/core/types/block_test.go index 4763ad1..2e6807d 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -86,6 +86,20 @@ func (s *BlockTestSuite) TestGenesisBlock() { s.False(b2.IsGenesis()) } +func (s *BlockTestSuite) TestIsAcking() { + // This test case would check if types.Block.IsAcking works + ack0 := common.NewRandomHash() + acks0 := common.Hashes{ + ack0, + common.NewRandomHash(), + common.NewRandomHash(), + } + b0 := &Block{Acks: common.NewSortedHashes(acks0)} + s.True(b0.IsAcking(ack0)) + s.False(b0.IsAcking(common.Hash{})) + s.False(b0.IsAcking(common.NewRandomHash())) +} + func TestBlock(t *testing.T) { suite.Run(t, new(BlockTestSuite)) } |