diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2015-03-03 07:49:12 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2015-03-03 09:01:46 -0800 |
commit | 51598b26319bf1ee98b399dee8152b902c62891a (patch) | |
tree | 21805efdbe19e67f3ed953695cb5f27c9d4ff4fe /src/test/test_bitcoin.h | |
parent | 86eb461c5bbe8200ab066f75b5acdf79fbae1086 (diff) |
Reinitialize state in between individual unit tests.
This changes the TestingSetup fixture to be per-unit-test rather than global.
Most tests don't need it, so it's only invoked in a few.
Diffstat (limited to 'src/test/test_bitcoin.h')
-rw-r--r-- | src/test/test_bitcoin.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h new file mode 100644 index 0000000000..c1448dcdeb --- /dev/null +++ b/src/test/test_bitcoin.h @@ -0,0 +1,18 @@ +#ifndef BITCOIN_TEST_TEST_BITCOIN_H +#define BITCOIN_TEST_TEST_BITCOIN_H + +#include "txdb.h" + +#include <boost/filesystem.hpp> +#include <boost/thread.hpp> + +struct TestingSetup { + CCoinsViewDB *pcoinsdbview; + boost::filesystem::path pathTemp; + boost::thread_group threadGroup; + + TestingSetup(); + ~TestingSetup(); +}; + +#endif |