diff options
author | Wins Vega <winsvega@mail.ru> | 2015-04-08 05:31:30 +0800 |
---|---|---|
committer | Wins Vega <winsvega@mail.ru> | 2015-04-08 05:31:30 +0800 |
commit | ff5ce7bda3346e3893d933196371564b4e45baec (patch) | |
tree | 235ddde071d09a6e3f78a25193bc790bee9680da | |
parent | 32bde18a276866264dddd9f9891df5d98cd19f97 (diff) | |
download | dexon-solidity-ff5ce7bda3346e3893d933196371564b4e45baec.tar.gz dexon-solidity-ff5ce7bda3346e3893d933196371564b4e45baec.tar.zst dexon-solidity-ff5ce7bda3346e3893d933196371564b4e45baec.zip |
Check State: windows build
-rw-r--r-- | TestHelper.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 3d96af42..4214796c 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -68,6 +68,8 @@ namespace test { struct ValueTooLarge: virtual Exception {}; +struct MissingFields : virtual Exception {}; + bigint const c_max256plus1 = bigint(1) << 256; ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): @@ -170,8 +172,12 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) { stateOptionsMap importedMap; importState(_o, _state, importedMap); - for (auto& stateOptionMap: importedMap) - BOOST_CHECK_MESSAGE(stateOptionMap.second.isAllSet(), "Import State[" << stateOptionMap.first << "]: State is not complete!"); //check that every parameter was declared in state object + for (auto& stateOptionMap : importedMap) + { + //check that every parameter was declared in state object + if (!stateOptionMap.second.isAllSet()) + BOOST_THROW_EXCEPTION(MissingFields() << errinfo_comment("Import State: Missing state fields!")); + } } void ImportTest::importTransaction(json_spirit::mObject& _o) |