From 183eb905ad15d76d556a869d01575bfb7aa44bf6 Mon Sep 17 00:00:00 2001 From: senthil Date: Thu, 27 Apr 2017 12:01:11 +0530 Subject: [PATCH] [FAB-3410] Improve unit test for txmgmt/version Increase the test coverage from 77% to 100%. Change-Id: I137c8741681a9a21558900bc1ec9b1cd8ac45af3 Signed-off-by: senthil --- core/ledger/kvledger/txmgmt/version/version_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/ledger/kvledger/txmgmt/version/version_test.go b/core/ledger/kvledger/txmgmt/version/version_test.go index de15cbb7184..71484bf85a4 100644 --- a/core/ledger/kvledger/txmgmt/version/version_test.go +++ b/core/ledger/kvledger/txmgmt/version/version_test.go @@ -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) {