diff options
author | chriseth <chris@ethereum.org> | 2018-02-24 02:29:20 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-02 00:19:35 +0800 |
commit | 05cc5f22b204a0c389e1de4feaa44d33492dd053 (patch) | |
tree | 941e6df6c0536310d01caacd510f1dfebb686193 /test/libsolidity/Assembly.cpp | |
parent | 739533e9c7534cd3a0b321a3a6be1e041c91e4a2 (diff) | |
download | dexon-solidity-05cc5f22b204a0c389e1de4feaa44d33492dd053.tar.gz dexon-solidity-05cc5f22b204a0c389e1de4feaa44d33492dd053.tar.zst dexon-solidity-05cc5f22b204a0c389e1de4feaa44d33492dd053.zip |
Correctly set evm version in tests
Diffstat (limited to 'test/libsolidity/Assembly.cpp')
-rw-r--r-- | test/libsolidity/Assembly.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp index 57a4f4e0..aff610a4 100644 --- a/test/libsolidity/Assembly.cpp +++ b/test/libsolidity/Assembly.cpp @@ -20,6 +20,8 @@ * Unit tests for Assembly Items from evmasm/Assembly.h */ +#include <test/TestHelper.h> + #include <libevmasm/SourceLocation.h> #include <libevmasm/Assembly.h> @@ -72,7 +74,7 @@ eth::AssemblyItems compileContract(string const& _sourceCode) for (ASTPointer<ASTNode> const& node: sourceUnit->nodes()) if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) { - TypeChecker checker(EVMVersion{}, errorReporter); + TypeChecker checker(dev::test::Options::get().evmVersion(), errorReporter); BOOST_REQUIRE_NO_THROW(checker.checkTypeRequirements(*contract)); if (!Error::containsOnlyWarnings(errorReporter.errors())) return AssemblyItems(); @@ -80,7 +82,7 @@ eth::AssemblyItems compileContract(string const& _sourceCode) for (ASTPointer<ASTNode> const& node: sourceUnit->nodes()) if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) { - Compiler compiler; + Compiler compiler(dev::test::Options::get().evmVersion()); compiler.compileContract(*contract, map<ContractDefinition const*, Assembly const*>{}, bytes()); return compiler.runtimeAssemblyItems(); |