From 5cd81ef3ac8e5ef0a3187209575ba6e1bfcfb21b Mon Sep 17 00:00:00 2001 From: coffeepots Date: Thu, 9 Aug 2018 16:54:00 +0100 Subject: [PATCH] Update doAssert to display the correct contents of stint values --- tests/test_helpers.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_helpers.nim b/tests/test_helpers.nim index e11da6f07..38c131cdc 100644 --- a/tests/test_helpers.nim +++ b/tests/test_helpers.nim @@ -105,7 +105,7 @@ proc verifyStateDB*(wantedState: JsonNode, stateDB: AccountStateDB) = # echo "FOUND ", found # echo "ACTUAL VALUE ", actualValue.toHex doAssert found - doAssert actualValue == wantedValue + doAssert actualValue == wantedValue, &"{actualValue.toHex} != {wantedValue.toHex}" let wantedCode = hexToSeqByte(accountData{"code"}.getStr).toRange @@ -116,9 +116,9 @@ proc verifyStateDB*(wantedState: JsonNode, stateDB: AccountStateDB) = actualBalance = stateDB.getBalance(account) actualNonce = stateDB.getNonce(account) - doAssert wantedCode == actualCode - doAssert wantedBalance == actualBalance - doAssert wantedNonce == actualNonce + doAssert wantedCode == actualCode, &"{wantedCode} != {actualCode}" + doAssert wantedBalance == actualBalance, &"{wantedBalance.toHex} != {actualBalance.toHex}" + doAssert wantedNonce == actualNonce, &"{wantedNonce.toHex} != {actualNonce.toHex}" proc getHexadecimalInt*(j: JsonNode): int64 = # parseutils.parseHex works with int which will overflow in 32 bit