mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implementing enforcing gas expectations in isoltest.
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
This commit is contained in:
co-authored by
Daniel Kirchner
parent
515f15f7a3
commit
aed3832b27
@@ -40,13 +40,24 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _options)
|
||||
{ return std::make_unique<SemanticTest>(_options.filename, _options.evmVersion, _options.vmPaths, _options.enforceCompileViaYul); }
|
||||
{
|
||||
return std::make_unique<SemanticTest>(
|
||||
_options.filename,
|
||||
_options.evmVersion,
|
||||
_options.vmPaths,
|
||||
_options.enforceCompileViaYul,
|
||||
_options.enforceGasCost,
|
||||
_options.enforceGasCostMinValue
|
||||
);
|
||||
}
|
||||
|
||||
explicit SemanticTest(
|
||||
std::string const& _filename,
|
||||
langutil::EVMVersion _evmVersion,
|
||||
std::vector<boost::filesystem::path> const& _vmPaths,
|
||||
bool _enforceViaYul = false
|
||||
bool _enforceViaYul = false,
|
||||
bool _enforceGasCost = false,
|
||||
u256 _enforceGasCostMinValue = 100000
|
||||
);
|
||||
|
||||
TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool _formatted = false) override;
|
||||
@@ -80,6 +91,8 @@ private:
|
||||
std::map<std::string, Builtin> m_builtins{};
|
||||
|
||||
bool m_gasCostFailure = false;
|
||||
bool m_enforceGasCost = false;
|
||||
u256 m_enforceGasCostMinValue;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user