Merge pull request #8258 from ethereum/someFixesToSyntaxTests

[Yul] Some fixes to syntax tests
This commit is contained in:
chriseth 2020-02-07 11:59:04 +01:00 committed by GitHub
commit 462cd43207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -45,7 +45,7 @@ std::map<string const, yul::Dialect const& (*)(langutil::EVMVersion)> const vali
{
"evmTyped",
[](langutil::EVMVersion _evmVersion) -> yul::Dialect const&
{ return yul::EVMDialectTyped::strictAssemblyForEVM(_evmVersion); }
{ return yul::EVMDialectTyped::instance(_evmVersion); }
},
{
"yul",
@ -70,7 +70,7 @@ vector<string> validDialectNames()
void SyntaxTest::parseAndAnalyze()
{
string dialectName = m_validatedSettings.count("Dialect") ? m_validatedSettings["Dialect"] : "evmTyped";
string dialectName = m_validatedSettings.count("dialect") ? m_validatedSettings["dialect"] : "evmTyped";
yul::Dialect const& dialect = validDialects.at(dialectName)(m_evmVersion);
@ -119,12 +119,12 @@ bool SyntaxTest::validateSettings(langutil::EVMVersion _evmVersion)
if (!CommonSyntaxTest::validateSettings(_evmVersion))
return false;
if (!m_settings.count("Dialect"))
if (!m_settings.count("dialect"))
return true;
string const dialect = m_settings["Dialect"];
m_validatedSettings["Dialect"] = dialect;
m_settings.erase("Dialect");
string const dialect = m_settings["dialect"];
m_validatedSettings["dialect"] = dialect;
m_settings.erase("dialect");
if (!validDialects.count(dialect))
BOOST_THROW_EXCEPTION(runtime_error{

View File

@ -5,4 +5,6 @@
function h() { let x := msize() }
function i() { let z := mload(0) }
}
// ====
// dialect: evm
// ----