From 14545852d17964513a4504d0dd1d01ccefe15caf Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 23 May 2019 12:22:17 +0200 Subject: [PATCH] Make YulInterpreterTest EVM version aware. --- test/libyul/YulInterpreterTest.cpp | 8 ++------ test/libyul/YulInterpreterTest.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test/libyul/YulInterpreterTest.cpp b/test/libyul/YulInterpreterTest.cpp index b918fd8ee..d473c3a5c 100644 --- a/test/libyul/YulInterpreterTest.cpp +++ b/test/libyul/YulInterpreterTest.cpp @@ -53,13 +53,9 @@ YulInterpreterTest::YulInterpreterTest(string const& _filename) BOOST_THROW_EXCEPTION(runtime_error("Cannot open test case: \"" + _filename + "\".")); file.exceptions(ios::badbit); + m_source = parseSourceAndSettings(file); + string line; - while (getline(file, line)) - { - if (boost::algorithm::starts_with(line, "// ----")) - break; - m_source += std::move(line) + "\n"; - } while (getline(file, line)) if (boost::algorithm::starts_with(line, "// ")) m_expectation += line.substr(3) + "\n"; diff --git a/test/libyul/YulInterpreterTest.h b/test/libyul/YulInterpreterTest.h index 5f3eb3761..4263b7336 100644 --- a/test/libyul/YulInterpreterTest.h +++ b/test/libyul/YulInterpreterTest.h @@ -37,7 +37,7 @@ namespace yul namespace test { -class YulInterpreterTest: public dev::solidity::test::TestCase +class YulInterpreterTest: public dev::solidity::test::EVMVersionRestrictedTestCase { public: static std::unique_ptr create(Config const& _config)