fix error message in tests
This commit is contained in:
parent
7a0215608e
commit
af28985f6e
|
@ -38,7 +38,7 @@ proc testGetBranch(tester: Tester, rootHash: KeccakHash, testStatusIMPL: var Tes
|
||||||
let acc = rlp.decode(recordFound, Account)
|
let acc = rlp.decode(recordFound, Account)
|
||||||
doAssert acc == account
|
doAssert acc == account
|
||||||
else:
|
else:
|
||||||
doAssert(false, "BUG IN TREE BUILDER")
|
doAssert(false, "BUG IN WITNESS/TREE BUILDER")
|
||||||
|
|
||||||
except ContractCodeError as e:
|
except ContractCodeError as e:
|
||||||
debugEcho "CONTRACT CODE ERROR: ", e.msg
|
debugEcho "CONTRACT CODE ERROR: ", e.msg
|
||||||
|
|
|
@ -103,7 +103,7 @@ proc runTest(numPairs: int, testStatusIMPL: var TestStatus, addInvalidKeys: stat
|
||||||
let acc = rlp.decode(recordFound, Account)
|
let acc = rlp.decode(recordFound, Account)
|
||||||
check acc == accs[i]
|
check acc == accs[i]
|
||||||
else:
|
else:
|
||||||
debugEcho "BUG IN TREE BUILDER ", i
|
debugEcho "BUG IN WITNESS/TREE BUILDER ", i
|
||||||
check false
|
check false
|
||||||
|
|
||||||
when addInvalidKeys:
|
when addInvalidKeys:
|
||||||
|
@ -192,7 +192,7 @@ proc witnessKeysMain*() =
|
||||||
"0abc6a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
"0abc6a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
||||||
"0abc7a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
"0abc7a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
||||||
"01237124bce7762869be690036144c12c256bdb06ee9073ad5ecca18a47c3254",
|
"01237124bce7762869be690036144c12c256bdb06ee9073ad5ecca18a47c3254",
|
||||||
"0890cc5b491732f964182ce4bde5e2468318692ed446e008f621b26f8ff56606"
|
"0890cc5b491732f964182ce4bde5e2468318692ed446e008f621b26f8ff56606"
|
||||||
]
|
]
|
||||||
|
|
||||||
let m = initMultiKeys(keys)
|
let m = initMultiKeys(keys)
|
||||||
|
@ -203,7 +203,7 @@ proc witnessKeysMain*() =
|
||||||
mg.match == true
|
mg.match == true
|
||||||
mg.group.first == 0
|
mg.group.first == 0
|
||||||
mg.group.last == 1
|
mg.group.last == 1
|
||||||
|
|
||||||
test "case 5: not match, match and not match":
|
test "case 5: not match, match and not match":
|
||||||
let keys = [
|
let keys = [
|
||||||
"01237124bce7762869be690036144c12c256bdb06ee9073ad5ecca18a47c3254",
|
"01237124bce7762869be690036144c12c256bdb06ee9073ad5ecca18a47c3254",
|
||||||
|
@ -211,7 +211,7 @@ proc witnessKeysMain*() =
|
||||||
"0abc6a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
"0abc6a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
||||||
"0abc7a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
"0abc7a163140158288775c8912aed274fb9d6a3a260e9e95e03e70ba8df30f6b",
|
||||||
"01237124bce7762869be690036144c12c256bdb06ee9073ad5ecca18a47c3254",
|
"01237124bce7762869be690036144c12c256bdb06ee9073ad5ecca18a47c3254",
|
||||||
"0890cc5b491732f964182ce4bde5e2468318692ed446e008f621b26f8ff56606"
|
"0890cc5b491732f964182ce4bde5e2468318692ed446e008f621b26f8ff56606"
|
||||||
]
|
]
|
||||||
|
|
||||||
let m = initMultiKeys(keys)
|
let m = initMultiKeys(keys)
|
||||||
|
@ -222,6 +222,6 @@ proc witnessKeysMain*() =
|
||||||
mg.match == true
|
mg.match == true
|
||||||
mg.group.first == 2
|
mg.group.first == 2
|
||||||
mg.group.last == 3
|
mg.group.last == 3
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
witnessKeysMain()
|
witnessKeysMain()
|
||||||
|
|
Loading…
Reference in New Issue