mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Check State
Style Changes
This commit is contained in:
parent
ba3cf808ca
commit
923e452846
@ -205,13 +205,7 @@ void ImportTest::importTransaction(json_spirit::mObject& _o)
|
||||
}
|
||||
}
|
||||
|
||||
void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, WhenError _throw)
|
||||
{
|
||||
stateOptionsMap defaultMap;
|
||||
checkExpectedState(_stateExpect, _statePost, defaultMap, _throw);
|
||||
}
|
||||
|
||||
void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, stateOptionsMap const& _expectedStateOptions, WhenError _throw)
|
||||
void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, stateOptionsMap const _expectedStateOptions, WhenError _throw)
|
||||
{
|
||||
#define CHECK(a,b) \
|
||||
if (_throw == WhenError::Throw) \
|
||||
|
@ -99,8 +99,7 @@ namespace test
|
||||
|
||||
struct ImportStateOptions
|
||||
{
|
||||
ImportStateOptions():m_bHasBalance(false), m_bHasNonce(false), m_bHasCode(false), m_bHasStorage(false) {}
|
||||
ImportStateOptions(bool _bSetAll):m_bHasBalance(_bSetAll), m_bHasNonce(_bSetAll), m_bHasCode(_bSetAll), m_bHasStorage(_bSetAll) {}
|
||||
ImportStateOptions(bool _bSetAll = false):m_bHasBalance(_bSetAll), m_bHasNonce(_bSetAll), m_bHasCode(_bSetAll), m_bHasStorage(_bSetAll) {}
|
||||
bool isAllSet() {return m_bHasBalance && m_bHasNonce && m_bHasCode && m_bHasStorage;}
|
||||
bool m_bHasBalance;
|
||||
bool m_bHasNonce;
|
||||
@ -121,8 +120,7 @@ public:
|
||||
void importTransaction(json_spirit::mObject& _o);
|
||||
|
||||
void exportTest(bytes const& _output, eth::State const& _statePost);
|
||||
static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, WhenError _throw = WhenError::Throw);
|
||||
static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const& _expectedStateOptions, WhenError _throw = WhenError::Throw);
|
||||
static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const _expectedStateOptions = stateOptionsMap(), WhenError _throw = WhenError::Throw);
|
||||
|
||||
eth::State m_statePre;
|
||||
eth::State m_statePost;
|
||||
|
@ -278,6 +278,7 @@
|
||||
},
|
||||
"expect" : {
|
||||
"c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
}
|
||||
@ -331,6 +332,7 @@
|
||||
},
|
||||
"expect" : {
|
||||
"c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
|
||||
"balance" : "0",
|
||||
"storage" : {
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user