Skip to content

Commit 183eb90

Browse files
committed
[FAB-3410] Improve unit test for txmgmt/version
Increase the test coverage from 77% to 100%. Change-Id: I137c8741681a9a21558900bc1ec9b1cd8ac45af3 Signed-off-by: senthil <cendhu@gmail.com>
1 parent ecc29dd commit 183eb90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/ledger/kvledger/txmgmt/version/version_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ func TestVersionComparison(t *testing.T) {
3535
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(10, 90)), 1)
3636
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(11, 1)), -1)
3737
testutil.AssertEquals(t, NewHeight(10, 100).Compare(NewHeight(10, 100)), 0)
38+
39+
testutil.AssertEquals(t, AreSame(NewHeight(10, 100), NewHeight(10, 100)), true)
40+
testutil.AssertEquals(t, AreSame(nil, nil), true)
41+
testutil.AssertEquals(t, AreSame(NewHeight(10, 100), nil), false)
3842
}
3943

4044
func TestVersionExtraBytes(t *testing.T) {

0 commit comments

Comments
 (0)