diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-07-01 11:58:22 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-07-01 15:17:30 +0000 |
commit | 7b18e838eaa303e5fbf5f09ead3ff5ed584a1c1f (patch) | |
tree | 53aa9f1a66545da4ea0df22b178c90871569e061 /tests | |
parent | wallet: do not print log settings when unset (diff) | |
download | monero-7b18e838eaa303e5fbf5f09ead3ff5ed584a1c1f.tar.xz |
unit_tests: check return values on test data parsing
Won't trigger in practice, but you never know when that code changes
Coverity 199723, 199685
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit_tests/blockchain_db.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit_tests/blockchain_db.cpp b/tests/unit_tests/blockchain_db.cpp index f302d7946..d7c60cecb 100644 --- a/tests/unit_tests/blockchain_db.cpp +++ b/tests/unit_tests/blockchain_db.cpp @@ -162,7 +162,7 @@ protected: { block bl; blobdata bd = h2b(i); - parse_and_validate_block_from_blob(bd, bl); + CHECK_AND_ASSERT_THROW_MES(parse_and_validate_block_from_blob(bd, bl), "Invalid block"); m_blocks.push_back(std::make_pair(bl, bd)); } for (auto& i : t_transactions) @@ -172,7 +172,7 @@ protected: { transaction tx; blobdata bd = h2b(j); - parse_and_validate_tx_from_blob(bd, tx); + CHECK_AND_ASSERT_THROW_MES(parse_and_validate_tx_from_blob(bd, tx), "Invalid transaction"); txs.push_back(std::make_pair(tx, bd)); } m_txs.push_back(txs); |