aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.h2
-rw-r--r--src/test/util/wallet.cpp2
-rw-r--r--src/test/util/wallet.h6
3 files changed, 8 insertions, 2 deletions
diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h
index 979eafc5a3..58ffd77995 100644
--- a/src/test/util/setup_common.h
+++ b/src/test/util/setup_common.h
@@ -26,11 +26,13 @@
extern const std::function<void(const std::string&)> G_TEST_LOG_FUN;
// Enable BOOST_CHECK_EQUAL for enum class types
+namespace std {
template <typename T>
std::ostream& operator<<(typename std::enable_if<std::is_enum<T>::value, std::ostream>::type& stream, const T& e)
{
return stream << static_cast<typename std::underlying_type<T>::type>(e);
}
+} // namespace std
/**
* This global and the helpers that use it are not thread-safe.
diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp
index 4273dfe719..52aaeabccf 100644
--- a/src/test/util/wallet.cpp
+++ b/src/test/util/wallet.cpp
@@ -12,6 +12,8 @@
#include <wallet/wallet.h>
#endif
+using wallet::CWallet;
+
const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj";
#ifdef ENABLE_WALLET
diff --git a/src/test/util/wallet.h b/src/test/util/wallet.h
index 565ef1756a..31281bf70e 100644
--- a/src/test/util/wallet.h
+++ b/src/test/util/wallet.h
@@ -7,7 +7,9 @@
#include <string>
+namespace wallet {
class CWallet;
+} // namespace wallet
// Constants //
@@ -16,9 +18,9 @@ extern const std::string ADDRESS_BCRT1_UNSPENDABLE;
// RPC-like //
/** Import the address to the wallet */
-void importaddress(CWallet& wallet, const std::string& address);
+void importaddress(wallet::CWallet& wallet, const std::string& address);
/** Returns a new address from the wallet */
-std::string getnewaddress(CWallet& w);
+std::string getnewaddress(wallet::CWallet& w);
#endif // BITCOIN_TEST_UTIL_WALLET_H