Skip to content

Commit

Permalink
[FAB-3410] Improve unit test for txmgmt/version
Browse files Browse the repository at this point in the history
Increase the test coverage from 77% to 100%.

Change-Id: I137c8741681a9a21558900bc1ec9b1cd8ac45af3
Signed-off-by: senthil <cendhu@gmail.com>
  • Loading branch information
cendhu committed Apr 28, 2017
1 parent ecc29dd commit 183eb90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/ledger/kvledger/txmgmt/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func TestVersionComparison(t *testing.T) {
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(10, 90)), 1)
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(11, 1)), -1)
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(10, 100)), 0)

testutil.AssertEquals(t, AreSame(NewHeight(10, 100), NewHeight(10, 100)), true)
testutil.AssertEquals(t, AreSame(nil, nil), true)
testutil.AssertEquals(t, AreSame(NewHeight(10, 100), nil), false)
}

func TestVersionExtraBytes(t *testing.T) {
Expand Down

0 comments on commit 183eb90

Please sign in to comment.