Merge branch '0.5.x' into 0.6.0.x
[novacoin.git] / src / test / test_bitcoin.cpp
index c7f45a0..7ff7545 100644 (file)
@@ -6,6 +6,22 @@
 
 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);