diff options
author | Dimitry <winsvega@mail.ru> | 2015-06-06 02:43:41 +0800 |
---|---|---|
committer | Dimitry <winsvega@mail.ru> | 2015-06-17 22:01:31 +0800 |
commit | 82a61176dda36f313e90132ee350bda1d30ed61b (patch) | |
tree | bbaf02f8a300aa2874483b036c0bf46c987b0c92 /TestHelper.h | |
parent | 587819dd3ceaed280b315a4a743c814964b8374d (diff) | |
download | dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.tar dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.tar.gz dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.tar.bz2 dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.tar.lz dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.tar.xz dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.tar.zst dexon-solidity-82a61176dda36f313e90132ee350bda1d30ed61b.zip |
FuzzTesting: VMTests + TransactionTests support
Diffstat (limited to 'TestHelper.h')
-rw-r--r-- | TestHelper.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/TestHelper.h b/TestHelper.h index df74c2dc..b1ad923a 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -35,13 +35,21 @@ #ifdef DONTUSE_BOOST_MACROS #define TBOOST_THROW_EXCEPTION(arg) throw dev::Exception(); #define TBOOST_REQUIRE(arg) if(arg == false) throw dev::Exception(); + #define TBOOST_REQUIRE_EQUAL(arg1, arg2) if(arg1 != arg2) throw dev::Exception(); + #define TBOOST_CHECK_EQUAL(arg1, arg2) if(arg1 != arg2) throw dev::Exception(); + #define TBOOST_CHECK(arg) if(arg == false) throw dev::Exception(); #define TBOOST_CHECK_MESSAGE(arg1, arg2) if(arg1 == false) throw dev::Exception(); #define TBOOST_WARN_MESSAGE(arg1, arg2) throw dev::Exception(); + #define TBOOST_ERROR(arg) throw dev::Exception(); #else #define TBOOST_THROW_EXCEPTION(arg) BOOST_THROW_EXCEPTION(arg) #define TBOOST_REQUIRE(arg) BOOST_REQUIRE(arg) + #define TBOOST_REQUIRE_EQUAL(arg1, arg2) BOOST_REQUIRE_EQUAL(arg1, arg2) + #define TBOOST_CHECK(arg) BOOOST_CHECK(arg) + #define TBOOST_CHECK_EQUAL(arg1, arg2) BOOST_CHECK_EQUAL(arg1, arg2) #define TBOOST_CHECK_MESSAGE(arg1, arg2) BOOST_CHECK_MESSAGE(arg1, arg2) #define TBOOST_WARN_MESSAGE(arg1, arg2) BOOST_WARN_MESSAGE(arg1, arg2) + #define TBOOST_ERROR(arg) BOOST_ERROR(arg) #endif namespace dev @@ -179,6 +187,7 @@ json_spirit::mObject fillJsonWithTransaction(eth::Transaction _txn); //Fill Test Functions void doTransactionTests(json_spirit::mValue& _v, bool _fillin); void doStateTests(json_spirit::mValue& v, bool _fillin); +void doVMTests(json_spirit::mValue& v, bool _fillin); template<typename mapType> void checkAddresses(mapType& _expectedAddrs, mapType& _resultAddrs) @@ -188,9 +197,9 @@ void checkAddresses(mapType& _expectedAddrs, mapType& _resultAddrs) auto& resultAddr = resultPair.first; auto expectedAddrIt = _expectedAddrs.find(resultAddr); if (expectedAddrIt == _expectedAddrs.end()) - BOOST_ERROR("Missing result address " << resultAddr); + TBOOST_ERROR("Missing result address " << resultAddr); } - BOOST_CHECK(_expectedAddrs == _resultAddrs); + TBOOST_CHECK((_expectedAddrs == _resultAddrs)); } class Options |