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.
This commit is contained in:
18
src/test/test_bitcoin.h
Normal file
18
src/test/test_bitcoin.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user