From ed27c77defd98feb65038659f689eb86ae55ceaa Mon Sep 17 00:00:00 2001 From: Alexander Arlt Date: Tue, 27 Apr 2021 16:22:36 -0500 Subject: [PATCH] [isoltest] Ignore gas checks on isoltest builtins. --- test/libsolidity/SemanticTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/libsolidity/SemanticTest.cpp b/test/libsolidity/SemanticTest.cpp index dfa160cc2..51a5a3c9c 100644 --- a/test/libsolidity/SemanticTest.cpp +++ b/test/libsolidity/SemanticTest.cpp @@ -383,12 +383,14 @@ bool SemanticTest::checkGasCostExpectation(TestFunctionCall& io_test, bool _comp // or test is run with abi encoder v1 only // or gas used less than threshold for enforcing feature // or setting is "ir" and it's not included in expectations + // or if the called function is an isoltest builtin e.g. `smokeTest` or `storageEmpty` if ( !m_enforceGasCost || ( (setting == "ir" || m_gasUsed < m_enforceGasCostMinValue || m_gasUsed >= m_gas) && io_test.call().expectations.gasUsed.count(setting) == 0 - ) + ) || + io_test.call().kind == FunctionCall::Kind::Builtin ) return true;