aboutsummaryrefslogtreecommitdiffstats
path: root/TestUtils.h
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-03-26 02:51:08 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-03-26 02:51:08 +0800
commit9a032ef39fba817c965f3850aacafecb8f89cf7a (patch)
treea071e2b7dbbf970177499d4852fe2f842a0f1488 /TestUtils.h
parentac558b0377ae30223347dae215b823b6b55e5046 (diff)
downloaddexon-solidity-9a032ef39fba817c965f3850aacafecb8f89cf7a.tar.gz
dexon-solidity-9a032ef39fba817c965f3850aacafecb8f89cf7a.tar.zst
dexon-solidity-9a032ef39fba817c965f3850aacafecb8f89cf7a.zip
fixes for test/TestUtils.h
Diffstat (limited to 'TestUtils.h')
-rw-r--r--TestUtils.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/TestUtils.h b/TestUtils.h
index fef10e98..f9817c21 100644
--- a/TestUtils.h
+++ b/TestUtils.h
@@ -41,24 +41,24 @@ static SharedMutex x_boostTest;
struct LoadTestFileFixture
{
LoadTestFileFixture();
-
- static bool m_loaded;
- static Json::Value m_json;
+
+protected:
+ Json::Value m_json;
};
struct ParallelFixture
{
- void enumerateThreads(std::function<void()> callback);
+ void enumerateThreads(std::function<void()> callback) const;
};
struct BlockChainFixture: public LoadTestFileFixture
{
- void enumerateBlockchains(std::function<void(Json::Value const&, dev::eth::BlockChain&, dev::eth::State state)> callback);
+ void enumerateBlockchains(std::function<void(Json::Value const&, dev::eth::BlockChain const&, dev::eth::State state)> callback) const;
};
struct ClientBaseFixture: public BlockChainFixture
{
- void enumerateClients(std::function<void(Json::Value const&, dev::eth::ClientBase&)> callback);
+ void enumerateClients(std::function<void(Json::Value const&, dev::eth::ClientBase&)> callback) const;
};
// important BOOST TEST do have problems with thread safety!!!
@@ -70,7 +70,7 @@ struct ClientBaseFixture: public BlockChainFixture
// https://codecrafter.wordpress.com/2012/11/01/c-unit-test-framework-adapter-part-3/
struct ParallelClientBaseFixture: public ClientBaseFixture, public ParallelFixture
{
- void enumerateClients(std::function<void(Json::Value const&, dev::eth::ClientBase&)> callback);
+ void enumerateClients(std::function<void(Json::Value const&, dev::eth::ClientBase&)> callback) const;
};
struct JsonRpcFixture: public ClientBaseFixture