aboutsummaryrefslogtreecommitdiffstats
path: root/TestHelper.h
diff options
context:
space:
mode:
authorChristoph Jentzsch <jentzsch.software@gmail.com>2014-10-30 00:25:02 +0800
committerChristoph Jentzsch <jentzsch.software@gmail.com>2014-10-30 00:25:02 +0800
commit3565d42a14feae1af85fa2aabc455d8f1f6da15b (patch)
treec6b04acddaa515fd8ee30e75d0440cf57c092ec3 /TestHelper.h
parent33813722006cdf49ba32543cbfc48ee27aac8e84 (diff)
downloaddexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.tar
dexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.tar.gz
dexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.tar.bz2
dexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.tar.lz
dexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.tar.xz
dexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.tar.zst
dexon-solidity-3565d42a14feae1af85fa2aabc455d8f1f6da15b.zip
Restructure state tests. Remove FakeStateClass
Diffstat (limited to 'TestHelper.h')
-rw-r--r--TestHelper.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/TestHelper.h b/TestHelper.h
index d6924a17..63c84fc4 100644
--- a/TestHelper.h
+++ b/TestHelper.h
@@ -21,6 +21,9 @@
#pragma once
+#include "JsonSpiritHeaders.h"
+#include <libethereum/State.h>
+
namespace dev
{
namespace eth
@@ -31,5 +34,46 @@ class Client;
void mine(Client& c, int numBlocks);
void connectClients(Client& c1, Client& c2);
+namespace test
+{
+
+class ImportTest
+{
+public:
+ ImportTest() = default;
+ ImportTest(json_spirit::mObject& _o, bool isFiller);
+
+ // imports
+ void importEnv(json_spirit::mObject& _o);
+ void importState(json_spirit::mObject& _o, State& _state);
+ void importExec(json_spirit::mObject& _o);
+ void importCallCreates(json_spirit::mArray& _callcreates);
+ void importGas(json_spirit::mObject& _o);
+ void importOutput(json_spirit::mObject& _o);
+
+ void exportTest();
+ Manifest* getManifest(){ return &m_manifest;}
+
+ State m_statePre;
+ State m_statePost;
+ ExtVMFace m_environment;
+ u256 gas;
+ u256 gasExec;
+ Transactions callcreates;
+ bytes output;
+ Manifest m_manifest;
+
+private:
+ // needed for const refs
+ bytes code;
+ bytes data;
+};
+
+// helping functions
+
+u256 toInt(json_spirit::mValue const& _v);
+byte toByte(json_spirit::mValue const& _v);
+
+}
}
}