5 #include <boost/test/unit_test.hpp> 8 #include <test/util/logging.h> 9 #include <test/util/setup_common.h> 17 SetWalletDir(m_walletdir_path_cases[
"default"]);
18 bool result = m_wallet_client->verify();
20 fs::path walletdir =
gArgs.
GetArg(
"-walletdir",
"");
21 fs::path expected_path = fs::canonical(m_walletdir_path_cases[
"default"]);
27 SetWalletDir(m_walletdir_path_cases[
"custom"]);
28 bool result = m_wallet_client->verify();
30 fs::path walletdir =
gArgs.
GetArg(
"-walletdir",
"");
31 fs::path expected_path = fs::canonical(m_walletdir_path_cases[
"custom"]);
37 SetWalletDir(m_walletdir_path_cases[
"nonexistent"]);
39 ASSERT_DEBUG_LOG(
"does not exist");
40 bool result = m_wallet_client->verify();
47 SetWalletDir(m_walletdir_path_cases[
"file"]);
49 ASSERT_DEBUG_LOG(
"is not a directory");
50 bool result = m_wallet_client->verify();
57 SetWalletDir(m_walletdir_path_cases[
"relative"]);
59 ASSERT_DEBUG_LOG(
"is a relative path");
60 bool result = m_wallet_client->verify();
67 SetWalletDir(m_walletdir_path_cases[
"trailing"]);
68 bool result = m_wallet_client->verify();
70 fs::path walletdir =
gArgs.
GetArg(
"-walletdir",
"");
71 fs::path expected_path = fs::canonical(m_walletdir_path_cases[
"default"]);
77 SetWalletDir(m_walletdir_path_cases[
"trailing2"]);
78 bool result = m_wallet_client->verify();
80 fs::path walletdir =
gArgs.
GetArg(
"-walletdir",
"");
81 fs::path expected_path = fs::canonical(m_walletdir_path_cases[
"default"]);
BOOST_AUTO_TEST_CASE(walletinit_verify_walletdir_default)
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_CHECK_EQUAL(v1, v2)
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
#define BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK(expr)