mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Set default EVM version to London.
This commit is contained in:
@@ -1067,9 +1067,11 @@ BOOST_AUTO_TEST_CASE(evm_version)
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"istanbul\"") != string::npos);
|
||||
result = compile(inputForVersion("\"evmVersion\": \"berlin\","));
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"berlin\"") != string::npos);
|
||||
result = compile(inputForVersion("\"evmVersion\": \"london\","));
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"london\"") != string::npos);
|
||||
// test default
|
||||
result = compile(inputForVersion(""));
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"berlin\"") != string::npos);
|
||||
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"london\"") != string::npos);
|
||||
// test invalid
|
||||
result = compile(inputForVersion("\"evmVersion\": \"invalid\","));
|
||||
BOOST_CHECK(result["errors"][0]["message"].asString() == "Invalid EVM version requested.");
|
||||
|
||||
Reference in New Issue
Block a user