Make YulInterpreterTest EVM version aware.

This commit is contained in:
chriseth 2019-05-23 12:22:17 +02:00
parent 1ca3edf6a1
commit 14545852d1
2 changed files with 3 additions and 7 deletions

View File

@ -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";

View File

@ -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<TestCase> create(Config const& _config)