mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Updates semantic tests to 0.7.0.
This commit is contained in:
parent
fe1676203d
commit
729b47e641
@ -42,7 +42,7 @@ namespace
|
|||||||
{
|
{
|
||||||
|
|
||||||
static char const* registrarCode = R"DELIMITER(
|
static char const* registrarCode = R"DELIMITER(
|
||||||
pragma solidity >=0.4.0 <0.7.0;
|
pragma solidity >=0.4.0 <0.8.0;
|
||||||
|
|
||||||
abstract contract NameRegister {
|
abstract contract NameRegister {
|
||||||
function addr(string memory _name) public virtual view returns (address o_owner);
|
function addr(string memory _name) public virtual view returns (address o_owner);
|
||||||
|
@ -53,7 +53,7 @@ static char const* registrarCode = R"DELIMITER(
|
|||||||
// @authors:
|
// @authors:
|
||||||
// Gav Wood <g@ethdev.com>
|
// Gav Wood <g@ethdev.com>
|
||||||
|
|
||||||
pragma solidity >=0.4.0 <0.7.0;
|
pragma solidity >=0.4.0 <0.8.0;
|
||||||
|
|
||||||
abstract contract Registrar {
|
abstract contract Registrar {
|
||||||
event Changed(string indexed name);
|
event Changed(string indexed name);
|
||||||
|
@ -56,7 +56,7 @@ static char const* walletCode = R"DELIMITER(
|
|||||||
// some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the
|
// some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the
|
||||||
// interior is executed.
|
// interior is executed.
|
||||||
|
|
||||||
pragma solidity >=0.4.0 <0.7.0;
|
pragma solidity >=0.4.0 <0.8.0;
|
||||||
|
|
||||||
contract multiowned {
|
contract multiowned {
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE(string_storage)
|
|||||||
auto evmVersion = dev::test::Options::get().evmVersion();
|
auto evmVersion = dev::test::Options::get().evmVersion();
|
||||||
|
|
||||||
if (evmVersion <= EVMVersion::byzantium())
|
if (evmVersion <= EVMVersion::byzantium())
|
||||||
CHECK_DEPLOY_GAS(134209, 130895, evmVersion);
|
CHECK_DEPLOY_GAS(134145, 130831, evmVersion);
|
||||||
// This is only correct on >=Constantinople.
|
// This is only correct on >=Constantinople.
|
||||||
else if (Options::get().useABIEncoderV2)
|
else if (Options::get().useABIEncoderV2)
|
||||||
{
|
{
|
||||||
@ -107,22 +107,22 @@ BOOST_AUTO_TEST_CASE(string_storage)
|
|||||||
{
|
{
|
||||||
// Costs with 0 are cases which cannot be triggered in tests.
|
// Costs with 0 are cases which cannot be triggered in tests.
|
||||||
if (evmVersion < EVMVersion::istanbul())
|
if (evmVersion < EVMVersion::istanbul())
|
||||||
CHECK_DEPLOY_GAS(0, 124033, evmVersion);
|
CHECK_DEPLOY_GAS(0, 123969, evmVersion);
|
||||||
else
|
else
|
||||||
CHECK_DEPLOY_GAS(0, 110981, evmVersion);
|
CHECK_DEPLOY_GAS(0, 110969, evmVersion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (evmVersion < EVMVersion::istanbul())
|
if (evmVersion < EVMVersion::istanbul())
|
||||||
CHECK_DEPLOY_GAS(147835, 131687, evmVersion);
|
CHECK_DEPLOY_GAS(147835, 123969, evmVersion);
|
||||||
else
|
else
|
||||||
CHECK_DEPLOY_GAS(131871, 117231, evmVersion);
|
CHECK_DEPLOY_GAS(131871, 110969, evmVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (evmVersion < EVMVersion::istanbul())
|
else if (evmVersion < EVMVersion::istanbul())
|
||||||
CHECK_DEPLOY_GAS(126993, 119723, evmVersion);
|
CHECK_DEPLOY_GAS(126929, 119659, evmVersion);
|
||||||
else
|
else
|
||||||
CHECK_DEPLOY_GAS(114357, 107347, evmVersion);
|
CHECK_DEPLOY_GAS(114345, 107335, evmVersion);
|
||||||
|
|
||||||
if (evmVersion >= EVMVersion::byzantium())
|
if (evmVersion >= EVMVersion::byzantium())
|
||||||
{
|
{
|
||||||
@ -142,9 +142,9 @@ BOOST_AUTO_TEST_CASE(string_storage)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (evmVersion < EVMVersion::istanbul())
|
if (evmVersion < EVMVersion::istanbul())
|
||||||
CHECK_GAS(21707, 21635, 20);
|
CHECK_GAS(21707, 21559, 20);
|
||||||
else
|
else
|
||||||
CHECK_GAS(21499, 21431, 20);
|
CHECK_GAS(21499, 21351, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (evmVersion < EVMVersion::istanbul())
|
else if (evmVersion < EVMVersion::istanbul())
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pragma solidity >=0.5.7 <0.7.0;
|
pragma solidity >=0.4.0 <0.8.0;
|
||||||
|
|
||||||
contract InvalidTest {
|
contract InvalidTest {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pragma solidity >=0.4.0 <0.7.0;
|
pragma solidity >=0.4.0 <0.8.0;
|
||||||
|
|
||||||
contract ERC20 {
|
contract ERC20 {
|
||||||
event Transfer(address indexed from, address indexed to, uint256 value);
|
event Transfer(address indexed from, address indexed to, uint256 value);
|
||||||
|
Loading…
Reference in New Issue
Block a user