Skip to content

Commit 47fe551

Browse files
committed
test: Kill BOOST_ASSERT
1 parent 681ecac commit 47fe551

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/wallet/test/db_tests.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <boost/test/unit_test.hpp>
66

77
#include <test/util/setup_common.h>
8+
#include <util/check.h>
89
#include <util/fs.h>
910
#include <util/translation.h>
1011
#ifdef USE_BDB
@@ -141,12 +142,10 @@ BOOST_AUTO_TEST_CASE(db_cursor_prefix_range_test)
141142
{
142143
// Test each supported db
143144
for (const auto& database : TestDatabases(m_path_root)) {
144-
BOOST_ASSERT(database);
145-
146145
std::vector<std::string> prefixes = {"", "FIRST", "SECOND", "P\xfe\xff", "P\xff\x01", "\xff\xff"};
147146

148147
// Write elements to it
149-
std::unique_ptr<DatabaseBatch> handler = database->MakeBatch();
148+
std::unique_ptr<DatabaseBatch> handler = Assert(database)->MakeBatch();
150149
for (unsigned int i = 0; i < 10; i++) {
151150
for (const auto& prefix : prefixes) {
152151
BOOST_CHECK(handler->Write(std::make_pair(prefix, i), i));
@@ -162,7 +161,7 @@ BOOST_AUTO_TEST_CASE(db_cursor_prefix_range_test)
162161
DataStream value;
163162
for (int i = 0; i < 10; i++) {
164163
DatabaseCursor::Status status = cursor->Next(key, value);
165-
BOOST_ASSERT(status == DatabaseCursor::Status::MORE);
164+
BOOST_CHECK_EQUAL(status, DatabaseCursor::Status::MORE);
166165

167166
std::string key_back;
168167
unsigned int i_back;

0 commit comments

Comments
 (0)