mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-26 15:36:19 +01:00
test: Add ASSERT_DEBUG_LOG to unit test framework
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <noui.h>
|
||||
#include <test/lib/logging.h>
|
||||
#include <test/setup_common.h>
|
||||
#include <util/system.h>
|
||||
#include <wallet/test/init_test_fixture.h>
|
||||
@@ -34,28 +35,31 @@ BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_custom)
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_does_not_exist)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["nonexistent"]);
|
||||
noui_suppress();
|
||||
bool result = m_chain_client->verify();
|
||||
noui_reconnect();
|
||||
BOOST_CHECK(result == false);
|
||||
{
|
||||
ASSERT_DEBUG_LOG("does not exist");
|
||||
bool result = m_chain_client->verify();
|
||||
BOOST_CHECK(result == false);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_directory)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["file"]);
|
||||
noui_suppress();
|
||||
bool result = m_chain_client->verify();
|
||||
noui_reconnect();
|
||||
BOOST_CHECK(result == false);
|
||||
{
|
||||
ASSERT_DEBUG_LOG("is not a directory");
|
||||
bool result = m_chain_client->verify();
|
||||
BOOST_CHECK(result == false);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_is_not_relative)
|
||||
{
|
||||
SetWalletDir(m_walletdir_path_cases["relative"]);
|
||||
noui_suppress();
|
||||
bool result = m_chain_client->verify();
|
||||
noui_reconnect();
|
||||
BOOST_CHECK(result == false);
|
||||
{
|
||||
ASSERT_DEBUG_LOG("is a relative path");
|
||||
bool result = m_chain_client->verify();
|
||||
BOOST_CHECK(result == false);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_no_trailing)
|
||||
|
||||
Reference in New Issue
Block a user