mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7916 from ethereum/fix-testcase-invalid-evmversion-handling
soltest: Improve handling invalid EVMVersion syntax in test files.
This commit is contained in:
commit
d66675602e
@ -186,7 +186,7 @@ bool EVMVersionRestrictedTestCase::validateSettings(langutil::EVMVersion _evmVer
|
||||
versionString = versionString.substr(versionBegin);
|
||||
std::optional<langutil::EVMVersion> version = langutil::EVMVersion::fromString(versionString);
|
||||
if (!version)
|
||||
throw runtime_error("Invalid EVM version: \"" + versionString + "\"");
|
||||
BOOST_THROW_EXCEPTION(runtime_error{"Invalid EVM version: \"" + versionString + "\""});
|
||||
|
||||
if (comparator == ">")
|
||||
return _evmVersion > version;
|
||||
@ -201,6 +201,5 @@ bool EVMVersionRestrictedTestCase::validateSettings(langutil::EVMVersion _evmVer
|
||||
else if (comparator == "!")
|
||||
return !(_evmVersion == version);
|
||||
else
|
||||
throw runtime_error("Invalid EVM comparator: \"" + comparator + "\"");
|
||||
return false; // not reached
|
||||
BOOST_THROW_EXCEPTION(runtime_error{"Invalid EVM comparator: \"" + comparator + "\""});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user