mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[test] Fixes ExecutionFramework providing different contract addresses when running test cases for both, old and new yul codegen.
This commit is contained in:
parent
b65a165da1
commit
495abee769
@ -53,12 +53,16 @@ ExecutionFramework::ExecutionFramework(langutil::EVMVersion _evmVersion):
|
||||
m_optimiserSettings = solidity::frontend::OptimiserSettings::full();
|
||||
else if (solidity::test::CommonOptions::get().optimize)
|
||||
m_optimiserSettings = solidity::frontend::OptimiserSettings::standard();
|
||||
m_evmHost->reset();
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
void ExecutionFramework::reset()
|
||||
{
|
||||
m_evmHost->reset();
|
||||
for (size_t i = 0; i < 10; i++)
|
||||
m_evmHost->accounts[EVMHost::convertToEVMC(account(i))].balance =
|
||||
EVMHost::convertToEVMC(u256(1) << 100);
|
||||
|
||||
}
|
||||
|
||||
std::pair<bool, string> ExecutionFramework::compareAndCreateMessage(
|
||||
|
@ -251,6 +251,8 @@ private:
|
||||
}
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
|
||||
void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0);
|
||||
void sendEther(Address const& _to, u256 const& _value);
|
||||
size_t currentTimestamp();
|
||||
|
@ -101,6 +101,7 @@ TestCase::TestResult SemanticTest::run(ostream& _stream, string const& _linePref
|
||||
{
|
||||
for(bool compileViaYul: set<bool>{!m_runWithoutYul, m_runWithYul})
|
||||
{
|
||||
reset();
|
||||
bool success = true;
|
||||
|
||||
m_compileViaYul = compileViaYul;
|
||||
|
Loading…
Reference in New Issue
Block a user