X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Ftest%2Ftest_bitcoin.cpp;h=bcf09078712f638f11ca77a776ab65c007b2d477;hb=f138f8e25f7282834f368b46ebb4072615441c2c;hp=4f98a93c19656e98beebc9a27073c1ec1a8cd035;hpb=2f7f2a5fca52f064a2f5663ab46c7c16e1b117f8;p=novacoin.git diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 4f98a93..bcf0907 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -1,21 +1,44 @@ #define BOOST_TEST_MODULE Bitcoin Test Suite #include -#include "../main.h" -#include "../wallet.h" - -#include "uint160_tests.cpp" -#include "uint256_tests.cpp" -#include "script_tests.cpp" -#include "transaction_tests.cpp" -#include "DoS_tests.cpp" -#include "base64_tests.cpp" -#include "util_tests.cpp" -#include "base58_tests.cpp" +#include "db.h" +#include "main.h" +#include "wallet.h" CWallet* pwalletMain; +CClientUIInterface uiInterface; + +extern bool fPrintToConsole; +extern void noui_connect(); + +struct TestingSetup { + TestingSetup() { + fPrintToDebugger = true; // don't want to write to debug.log file + noui_connect(); + bitdb.MakeMock(); + LoadBlockIndex(true); + bool fFirstRun; + pwalletMain = new CWallet("wallet.dat"); + pwalletMain->LoadWallet(fFirstRun); + RegisterWallet(pwalletMain); + } + ~TestingSetup() + { + delete pwalletMain; + pwalletMain = NULL; + bitdb.Flush(true); + } +}; + +BOOST_GLOBAL_FIXTURE(TestingSetup); void Shutdown(void* parg) { - exit(0); + exit(0); } + +void StartShutdown() +{ + exit(0); +} +