diff options
author | chriseth <chris@ethereum.org> | 2018-02-23 00:21:26 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-02 00:19:35 +0800 |
commit | f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4 (patch) | |
tree | 80555ec0e8139a30bfd7bc83cc1acf811eada487 /test/ExecutionFramework.cpp | |
parent | 83515eadcf21decc9355c69c621c4d530a62b04e (diff) | |
download | dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.gz dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.tar.zst dexon-solidity-f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4.zip |
Test both EVM versions.
Diffstat (limited to 'test/ExecutionFramework.cpp')
-rw-r--r-- | test/ExecutionFramework.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/ExecutionFramework.cpp b/test/ExecutionFramework.cpp index 85b5bd3b..adf514e2 100644 --- a/test/ExecutionFramework.cpp +++ b/test/ExecutionFramework.cpp @@ -20,13 +20,15 @@ * Framework for executing contracts and testing them using RPC. */ -#include <cstdlib> -#include <boost/test/framework.hpp> -#include <libdevcore/CommonIO.h> #include <test/ExecutionFramework.h> +#include <libdevcore/CommonIO.h> + +#include <boost/test/framework.hpp> #include <boost/algorithm/string/replace.hpp> +#include <cstdlib> + using namespace std; using namespace dev; using namespace dev::test; @@ -53,6 +55,13 @@ ExecutionFramework::ExecutionFramework() : m_showMessages(dev::test::Options::get().showMessages), m_sender(m_rpc.account(0)) { + if (!dev::test::Options::get().evmVersion.empty()) + { + auto version = solidity::EVMVersion::fromString(dev::test::Options::get().evmVersion); + BOOST_REQUIRE_MESSAGE(version, "Invalid EVM version: " + dev::test::Options::get().evmVersion); + m_evmVersion = *version; + } + m_rpc.test_rewindToBlock(0); } |