diff options
author | chriseth <chris@ethereum.org> | 2018-03-01 19:06:36 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-05 18:36:33 +0800 |
commit | 6ec4517929e8c0eca022f4771ba217db5d80beed (patch) | |
tree | ece2e275ee9bb190d33e05cef5cc549b21abf8e3 /test/liblll/Compiler.cpp | |
parent | 5a54cd5c708227ad6982b06de7b799ece5065917 (diff) | |
download | dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.gz dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.zst dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.zip |
Use EVM version in gas meter and optimizer.
Diffstat (limited to 'test/liblll/Compiler.cpp')
-rw-r--r-- | test/liblll/Compiler.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/liblll/Compiler.cpp b/test/liblll/Compiler.cpp index ace97e15..6c6eae3f 100644 --- a/test/liblll/Compiler.cpp +++ b/test/liblll/Compiler.cpp @@ -20,11 +20,16 @@ * Unit tests for the LLL compiler. */ +#include <test/TestHelper.h> + +#include <libdevcore/FixedHash.h> + +#include <liblll/Compiler.h> + +#include <boost/test/unit_test.hpp> + #include <string> #include <memory> -#include <boost/test/unit_test.hpp> -#include <liblll/Compiler.h> -#include <libdevcore/FixedHash.h> using namespace std; @@ -41,7 +46,7 @@ namespace bool successCompile(string const& _sourceCode) { vector<string> errors; - bytes bytecode = eth::compileLLL(_sourceCode, false, &errors); + bytes bytecode = eth::compileLLL(_sourceCode, dev::test::Options::get().evmVersion(), false, &errors); if (!errors.empty()) return false; if (bytecode.empty()) @@ -353,7 +358,7 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_functional) for (size_t i = 0; i < opcodes_bytecode.size(); i++) { vector<string> errors; - bytes code = eth::compileLLL(opcodes_lll[i], false, &errors); + bytes code = eth::compileLLL(opcodes_lll[i], dev::test::Options::get().evmVersion(), false, &errors); BOOST_REQUIRE_MESSAGE(errors.empty(), opcodes_lll[i]); @@ -641,7 +646,7 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_asm) for (size_t i = 0; i < opcodes_bytecode.size(); i++) { vector<string> errors; - bytes code = eth::compileLLL(opcodes_lll[i], false, &errors); + bytes code = eth::compileLLL(opcodes_lll[i], dev::test::Options::get().evmVersion(), false, &errors); BOOST_REQUIRE_MESSAGE(errors.empty(), opcodes_lll[i]); |