mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
test: Add BOOST_REQUIRE to getters returning optional
This commit is contained in:
parent
6d58a5c3b0
commit
fa21ca09a8
4 changed files with 12 additions and 11 deletions
|
|
@ -102,15 +102,15 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
|
|||
char key_res;
|
||||
uint256 val_res;
|
||||
|
||||
it->GetKey(key_res);
|
||||
it->GetValue(val_res);
|
||||
BOOST_REQUIRE(it->GetKey(key_res));
|
||||
BOOST_REQUIRE(it->GetValue(val_res));
|
||||
BOOST_CHECK_EQUAL(key_res, key);
|
||||
BOOST_CHECK_EQUAL(val_res.ToString(), in.ToString());
|
||||
|
||||
it->Next();
|
||||
|
||||
it->GetKey(key_res);
|
||||
it->GetValue(val_res);
|
||||
BOOST_REQUIRE(it->GetKey(key_res));
|
||||
BOOST_REQUIRE(it->GetValue(val_res));
|
||||
BOOST_CHECK_EQUAL(key_res, key2);
|
||||
BOOST_CHECK_EQUAL(val_res.ToString(), in2.ToString());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue