mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8415 from ethereum/tests-ExecutionFramework-reset
[test] Fixes ExecutionFramework providing different contract addresse…
This commit is contained in:
commit
a3bc752e53
@ -53,12 +53,16 @@ ExecutionFramework::ExecutionFramework(langutil::EVMVersion _evmVersion):
|
|||||||
m_optimiserSettings = solidity::frontend::OptimiserSettings::full();
|
m_optimiserSettings = solidity::frontend::OptimiserSettings::full();
|
||||||
else if (solidity::test::CommonOptions::get().optimize)
|
else if (solidity::test::CommonOptions::get().optimize)
|
||||||
m_optimiserSettings = solidity::frontend::OptimiserSettings::standard();
|
m_optimiserSettings = solidity::frontend::OptimiserSettings::standard();
|
||||||
m_evmHost->reset();
|
|
||||||
|
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExecutionFramework::reset()
|
||||||
|
{
|
||||||
|
m_evmHost->reset();
|
||||||
for (size_t i = 0; i < 10; i++)
|
for (size_t i = 0; i < 10; i++)
|
||||||
m_evmHost->accounts[EVMHost::convertToEVMC(account(i))].balance =
|
m_evmHost->accounts[EVMHost::convertToEVMC(account(i))].balance =
|
||||||
EVMHost::convertToEVMC(u256(1) << 100);
|
EVMHost::convertToEVMC(u256(1) << 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<bool, string> ExecutionFramework::compareAndCreateMessage(
|
std::pair<bool, string> ExecutionFramework::compareAndCreateMessage(
|
||||||
|
@ -251,6 +251,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void reset();
|
||||||
|
|
||||||
void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0);
|
void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0);
|
||||||
void sendEther(Address const& _to, u256 const& _value);
|
void sendEther(Address const& _to, u256 const& _value);
|
||||||
size_t currentTimestamp();
|
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})
|
for(bool compileViaYul: set<bool>{!m_runWithoutYul, m_runWithYul})
|
||||||
{
|
{
|
||||||
|
reset();
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
|
||||||
m_compileViaYul = compileViaYul;
|
m_compileViaYul = compileViaYul;
|
||||||
|
Loading…
Reference in New Issue
Block a user