Run gas tests on NoMetadata format only.

This commit is contained in:
Djordje Mijovic
2021-02-12 10:38:03 +01:00
parent 68a4efb2e7
commit b598948211
13 changed files with 41 additions and 41 deletions
+7 -7
View File
@@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE(string_storage)
}
}
)";
m_compiler.overwriteReleaseFlag(true);
m_compiler.setMetadataFormat(CompilerStack::MetadataFormat::NoMetadata);
compileAndRun(sourceCode);
auto evmVersion = solidity::test::CommonOptions::get().evmVersion();
@@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(string_storage)
if (CommonOptions::get().useABIEncoderV1)
CHECK_DEPLOY_GAS(133045, 129731, evmVersion);
else
CHECK_DEPLOY_GAS(155553, 132103, evmVersion);
CHECK_DEPLOY_GAS(144679, 121229, evmVersion);
}
// This is only correct on >=Constantinople.
else if (!CommonOptions::get().useABIEncoderV1)
@@ -110,22 +110,22 @@ BOOST_AUTO_TEST_CASE(string_storage)
{
// Costs with 0 are cases which cannot be triggered in tests.
if (evmVersion < EVMVersion::istanbul())
CHECK_DEPLOY_GAS(0, 120189, evmVersion);
CHECK_DEPLOY_GAS(0, 109241, evmVersion);
else
CHECK_DEPLOY_GAS(0, 108541, evmVersion);
CHECK_DEPLOY_GAS(0, 97697, evmVersion);
}
else
{
if (evmVersion < EVMVersion::istanbul())
CHECK_DEPLOY_GAS(149567, 123969, evmVersion);
CHECK_DEPLOY_GAS(138693, 123969, evmVersion);
else
CHECK_DEPLOY_GAS(134123, 110969, evmVersion);
CHECK_DEPLOY_GAS(123301, 110969, evmVersion);
}
}
else if (evmVersion < EVMVersion::istanbul())
CHECK_DEPLOY_GAS(125829, 118559, evmVersion);
else
CHECK_DEPLOY_GAS(114077, 107067, evmVersion);
CHECK_DEPLOY_GAS(114077, 96461, evmVersion);
if (evmVersion >= EVMVersion::byzantium())
{