aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-03-12 09:34:42 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-03-12 09:45:22 +0100
commit92fd887fd42a61e95f716d3193104827f60f856c (patch)
tree3768ed6d0cba9128dd6fc5b8caa65c2dafac7bf1 /src/test/test_bitcoin.h
parente564e63ef04e55b1e446f8440d51c611bc41cec6 (diff)
downloadbitcoin-92fd887fd42a61e95f716d3193104827f60f856c.tar.xz
tests: add a BasicTestingSetup and apply to all tests
Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
Diffstat (limited to 'src/test/test_bitcoin.h')
-rw-r--r--src/test/test_bitcoin.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index c1448dcdeb..2f75332d40 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -6,7 +6,19 @@
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
-struct TestingSetup {
+/** Basic testing setup.
+ * This just configures logging and chain parameters.
+ */
+struct BasicTestingSetup {
+ BasicTestingSetup();
+ ~BasicTestingSetup();
+};
+
+/** Testing setup that configures a complete environment.
+ * Included are data directory, coins database, script check threads
+ * and wallet (if enabled) setup.
+ */
+struct TestingSetup: public BasicTestingSetup {
CCoinsViewDB *pcoinsdbview;
boost::filesystem::path pathTemp;
boost::thread_group threadGroup;