From d1faa598ff2279e51845851e55ea051934737495 Mon Sep 17 00:00:00 2001 From: Michel van Kessel Date: Sun, 20 Dec 2020 16:51:25 +0100 Subject: [PATCH] update wallet tests II --- src/wallet/test/crypto_tests.cpp | 8 ++++---- src/wallet/test/rpc_wallet_tests.cpp | 16 ++++++++-------- src/wallet/test/wallet_test_fixture.cpp | 10 +++++----- src/wallet/test/wallet_test_fixture.h | 2 +- src/wallet/test/wallet_tests.cpp | 5 ++--- src/wallet/test/walletdb_tests.cpp | 10 +++++----- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/wallet/test/crypto_tests.cpp b/src/wallet/test/crypto_tests.cpp index b235b9609..644093324 100644 --- a/src/wallet/test/crypto_tests.cpp +++ b/src/wallet/test/crypto_tests.cpp @@ -2,10 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "random.h" -#include "utilstrencodings.h" -#include "test/test_bitcoin.h" -#include "wallet/crypter.h" +#include +#include +#include +#include #include diff --git a/src/wallet/test/rpc_wallet_tests.cpp b/src/wallet/test/rpc_wallet_tests.cpp index 8af8fe7a2..ce971d74d 100644 --- a/src/wallet/test/rpc_wallet_tests.cpp +++ b/src/wallet/test/rpc_wallet_tests.cpp @@ -2,15 +2,15 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "rpc/server.h" -#include "rpc/client.h" +#include +#include -#include "base58.h" -#include "dstencode.h" -#include "main.h" -#include "wallet/wallet.h" +#include +#include +#include +#include -#include "wallet/test/wallet_test_fixture.h" +#include #include #include @@ -19,7 +19,7 @@ using namespace std; -extern UniValue createArgs(int nRequired, const char* address1 = NULL, const char* address2 = NULL); +extern UniValue createArgs(int nRequired, const char* address1 = nullptr, const char* address2 = nullptr); extern UniValue CallRPC(string args); extern CWallet* pwalletMain; diff --git a/src/wallet/test/wallet_test_fixture.cpp b/src/wallet/test/wallet_test_fixture.cpp index a76db3761..fb6f5b496 100644 --- a/src/wallet/test/wallet_test_fixture.cpp +++ b/src/wallet/test/wallet_test_fixture.cpp @@ -2,11 +2,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "wallet/test/wallet_test_fixture.h" +#include -#include "rpc/server.h" -#include "wallet/db.h" -#include "wallet/wallet.h" +#include +#include +#include WalletTestingSetup::WalletTestingSetup(const std::string& chainName): TestingSetup(chainName) @@ -25,7 +25,7 @@ WalletTestingSetup::~WalletTestingSetup() { UnregisterValidationInterface(pwalletMain); delete pwalletMain; - pwalletMain = NULL; + pwalletMain = nullptr; bitdb.Flush(true); bitdb.Reset(); diff --git a/src/wallet/test/wallet_test_fixture.h b/src/wallet/test/wallet_test_fixture.h index 97a6d9839..4a32a262c 100644 --- a/src/wallet/test/wallet_test_fixture.h +++ b/src/wallet/test/wallet_test_fixture.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_WALLET_TEST_FIXTURE_H #define BITCOIN_WALLET_TEST_FIXTURE_H -#include "test/test_bitcoin.h" +#include /** Testing setup and teardown for wallet. */ diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 96a572c4c..4194819af 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -2,16 +2,15 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "wallet/wallet.h" +#include #include #include #include #include -#include "wallet/test/wallet_test_fixture.h" +#include -#include #include // how many times to run all the tests to have a chance to catch errors that only show up with particular random shuffles diff --git a/src/wallet/test/walletdb_tests.cpp b/src/wallet/test/walletdb_tests.cpp index c9da69bb4..39e1123ea 100644 --- a/src/wallet/test/walletdb_tests.cpp +++ b/src/wallet/test/walletdb_tests.cpp @@ -2,12 +2,12 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "test/test_bitcoin.h" -#include "random.h" -#include "fs.h" +#include +#include +#include -#include "wallet/wallet.h" -#include "wallet/walletdb.h" +#include +#include #include