Global fixture to send output to console instead of debug.log
authorGavin Andresen <gavinandresen@gmail.com>
Mon, 3 Oct 2011 20:14:13 +0000 (16:14 -0400)
committerGavin Andresen <gavinandresen@gmail.com>
Mon, 19 Dec 2011 17:40:19 +0000 (12:40 -0500)
src/test/test_bitcoin.cpp

index c7f45a0..4b52b74 100644 (file)
@@ -4,6 +4,16 @@
 #include "main.h"
 #include "wallet.h"
 
+extern bool fPrintToConsole;
+struct TestingSetup {
+    TestingSetup() {
+        fPrintToConsole = true; // don't want to write to debug.log file
+    }
+    ~TestingSetup() { }
+};
+
+BOOST_GLOBAL_FIXTURE(TestingSetup);
+
 CWallet* pwalletMain;
 
 void Shutdown(void* parg)