diff options
author | winsvega <winsvega@mail.ru> | 2015-04-02 23:33:28 +0800 |
---|---|---|
committer | winsvega <winsvega@mail.ru> | 2015-04-08 02:32:32 +0800 |
commit | 923e452846241f9f97b7fb0dc3351c0c479089b6 (patch) | |
tree | 3512ed508f986cd85e588eba202d60c366a46773 | |
parent | ba3cf808caf80fd0a36d8f4e1271573f2d388cae (diff) | |
download | dexon-solidity-923e452846241f9f97b7fb0dc3351c0c479089b6.tar.gz dexon-solidity-923e452846241f9f97b7fb0dc3351c0c479089b6.tar.zst dexon-solidity-923e452846241f9f97b7fb0dc3351c0c479089b6.zip |
Check State
Style Changes
-rw-r--r-- | TestHelper.cpp | 8 | ||||
-rw-r--r-- | TestHelper.h | 6 | ||||
-rw-r--r-- | stTransactionTestFiller.json | 2 |
3 files changed, 5 insertions, 11 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 0061b2ee..2c6ee8d4 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -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) \ diff --git a/TestHelper.h b/TestHelper.h index 81251649..04ca95be 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -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; diff --git a/stTransactionTestFiller.json b/stTransactionTestFiller.json index d936646c..28e7318f 100644 --- a/stTransactionTestFiller.json +++ b/stTransactionTestFiller.json @@ -278,6 +278,7 @@ }, "expect" : { "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", "storage" : { } } @@ -331,6 +332,7 @@ }, "expect" : { "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", "storage" : { } } |