Update test expectations in GasCosts for ABIEncoderV2

This commit is contained in:
Alex Beregszaszi 2019-11-19 14:22:21 +01:00
parent da50285ae3
commit 17f6a5a060

View File

@ -104,9 +104,19 @@ BOOST_AUTO_TEST_CASE(string_storage)
else if (Options::get().useABIEncoderV2) else if (Options::get().useABIEncoderV2)
{ {
if (Options::get().optimizeYul) if (Options::get().optimizeYul)
{
if (evmVersion < EVMVersion::istanbul())
CHECK_DEPLOY_GAS(151455, 127653, evmVersion); CHECK_DEPLOY_GAS(151455, 127653, evmVersion);
else else
CHECK_DEPLOY_GAS(123, 113821, evmVersion);
}
else
{
if (evmVersion < EVMVersion::istanbul())
CHECK_DEPLOY_GAS(151455, 135371, evmVersion); CHECK_DEPLOY_GAS(151455, 135371, evmVersion);
else
CHECK_DEPLOY_GAS(134711, 120083, evmVersion);
}
} }
else if (evmVersion < EVMVersion::istanbul()) else if (evmVersion < EVMVersion::istanbul())
CHECK_DEPLOY_GAS(126861, 119591, evmVersion); CHECK_DEPLOY_GAS(126861, 119591, evmVersion);
@ -122,9 +132,19 @@ BOOST_AUTO_TEST_CASE(string_storage)
else if (Options::get().useABIEncoderV2) else if (Options::get().useABIEncoderV2)
{ {
if (Options::get().optimizeYul) if (Options::get().optimizeYul)
{
if (evmVersion < EVMVersion::istanbul())
CHECK_GAS(21713, 21567, 20); CHECK_GAS(21713, 21567, 20);
else else
CHECK_GAS(21713, 21351, 20);
}
else
{
if (evmVersion < EVMVersion::istanbul())
CHECK_GAS(21713, 21635, 20); CHECK_GAS(21713, 21635, 20);
else
CHECK_GAS(21499, 21431, 20);
}
} }
else if (evmVersion < EVMVersion::istanbul()) else if (evmVersion < EVMVersion::istanbul())
CHECK_GAS(21546, 21526, 20); CHECK_GAS(21546, 21526, 20);