Merge branch '0.5.x' into 0.6.0.x
[novacoin.git] / src / test / test_bitcoin.cpp
index 4c9f7cc..c7e4bdd 100644 (file)
@@ -1,20 +1,34 @@
 #define BOOST_TEST_MODULE Bitcoin Test Suite
 #include <boost/test/unit_test.hpp>
 
-#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 "miner_tests.cpp"
+#include "main.h"
+#include "wallet.h"
 
 CWallet* pwalletMain;
 
+extern bool fPrintToConsole;
+struct TestingSetup {
+    TestingSetup() {
+        fPrintToConsole = true; // don't want to write to debug.log file
+        pwalletMain = new CWallet();
+        RegisterWallet(pwalletMain);
+    }
+    ~TestingSetup()
+    {
+        delete pwalletMain;
+        pwalletMain = NULL;
+    }
+};
+
+BOOST_GLOBAL_FIXTURE(TestingSetup);
+
 void Shutdown(void* parg)
 {
   exit(0);
 }
+
+void StartShutdown()
+{
+  exit(0);
+}
+