mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: Improve handling invalid EVMVersion syntax in test cases.
This commit is contained in:
parent
1fe1459b7d
commit
48dd1e398d
@ -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