Fabcoin Core
0.16.2
P2P Digital Currency
|
Classes | |
struct | BlockChainFixture |
class | BlockChainLoader |
Should be used to load test blockchain from json file Loads the blockchain from json, creates temporary directory to store it, removes the directory on dealloc. More... | |
struct | BlockStateUndefined |
struct | ChainBranch |
struct | ClientBaseFixture |
class | FakeExtVM |
class | FixedClient |
mvp implementation of ClientBase Doesn't support mining interface More... | |
class | ImportTest |
struct | JsonRpcFixture |
class | Listener |
Allows observing test execution process. More... | |
struct | LoadTestFileFixture |
struct | MissingFields |
class | Options |
struct | ParallelClientBaseFixture |
struct | ParallelFixture |
class | RandomCode |
struct | RandomCodeOptions |
struct | RlpDebug |
class | Stats |
class | TestBlock |
class | TestBlockChain |
struct | TestChannel |
class | TestClient |
class | TestOutputHelper |
class | TestTransaction |
struct | ValueTooLarge |
class | ZeroGasPricer |
Typedefs | |
typedef boost::random::uniform_int_distribution | boostIntDistrib |
typedef boost::random::discrete_distribution | boostDescreteDistrib |
typedef boost::uniform_int< uint64_t > | boostUint64Distrib |
typedef boost::random::variate_generator< boost::mt19937 &, boostIntDistrib > | boostIntGenerator |
typedef boost::random::variate_generator< boost::mt19937 &, boostDescreteDistrib > | boostWeightGenerator |
typedef boost::random::variate_generator< boost::mt19937 &, boostUint64Distrib > | boostUInt64Generator |
Enumerations | |
enum | SizeStrictness { SizeStrictness::Strict, SizeStrictness::Random } |
enum | RlpType { RlpType::Valid, RlpType::Invalid, RlpType::Test } |
enum | testType { testType::StateTests, testType::BlockChainTests, testType::GeneralStateTest, testType::Other } |
enum | Verbosity { Verbosity::Full, Verbosity::NiceReport, Verbosity::None } |
Functions | |
int | createRandomTest (std::vector< char * > const &_parameters) |
BOOST_AUTO_TEST_CASE (rndCode) | |
BOOST_AUTO_TEST_CASE (FixedHashComparisons) | |
BOOST_AUTO_TEST_CASE (FixedHashXOR) | |
BOOST_AUTO_TEST_CASE (FixedHashOR) | |
BOOST_AUTO_TEST_CASE (FixedHashAND) | |
BOOST_AUTO_TEST_CASE (FixedHashInvert) | |
BOOST_AUTO_TEST_CASE (FixedHashContains) | |
void | incrementSingleIteration (unsigned seed) |
BOOST_AUTO_TEST_CASE (FixedHashIncrement) | |
BOOST_AUTO_TEST_CASE (constructor) | |
BOOST_AUTO_TEST_CASE (simple_unions) | |
BOOST_AUTO_TEST_CASE (empty_union) | |
BOOST_AUTO_TEST_CASE (overlapping_unions) | |
BOOST_AUTO_TEST_CASE (complement) | |
BOOST_AUTO_TEST_CASE (iterator) | |
void | buildRLP (js::mValue &_v, RLPStream &_rlp) |
void | checkRLPAgainstJson (js::mValue &v, RLP &u) |
void | doRlpTests (json_spirit::mValue &v, bool _fillin) |
h256s | subs (bytesConstRef _node) |
void | syncStateTrie (bytesConstRef _block, OverlayDB const &_dbSource, OverlayDB &_dbDest) |
BOOST_AUTO_TEST_CASE (bcBasicInsert) | |
void | compareBlocks (TestBlock const &_a, TestBlock const &_b) |
mArray | writeTransactionsToJson (TransactionQueue const &_txsQueue) |
mObject | writeBlockHeaderToJson (BlockHeader const &_bi) |
void | overwriteBlockHeaderForTest (mObject const &_blObj, TestBlock &_block, ChainBranch const &_chainBranch) |
void | overwriteUncleHeaderForTest (mObject &_uncleHeaderObj, TestBlock &_uncle, vector< TestBlock > const &_uncles, ChainBranch const &_chainBranch) |
void | eraseJsonSectionForInvalidBlock (mObject &_blObj) |
void | checkJsonSectionForInvalidBlock (mObject &_blObj) |
void | checkExpectedException (mObject &_blObj, Exception const &_e) |
void | checkBlocks (TestBlock const &_blockFromFields, TestBlock const &_blockFromRlp, string const &_testname) |
void | doBlockchainTests (json_spirit::mValue &_v, bool _fillin) |
void | overwriteUncleHeaderForTest (mObject &uncleHeaderObj, TestBlock &uncle, std::vector< TestBlock > const &uncles, ChainBranch const &_chainBranch) |
void | executeGasPricerTest (string const &name, double _etherPrice, double _blockFee, string const &bcTestPath, TransactionPriority _txPrio, u256 _expectedAsk, u256 _expectedBid, eth::Network _sealEngineNetwork=eth::Network::TransitionnetTest) |
void | doStateTests (json_spirit::mValue &_v, bool _fillin) |
BOOST_AUTO_TEST_CASE (Basic) | |
BOOST_AUTO_TEST_CASE (LoadAccountCode) | |
void | doTransactionTests (json_spirit::mValue &_v, bool _fillin) |
void | doVMTests (json_spirit::mValue &_v, bool _fillin) |
std::ostream & | operator<< (std::ostream &out, Stats::clock::duration const &d) |
string | netIdToString (eth::Network _netId) |
eth::Network | stringToNetId (string const &_netname) |
json_spirit::mObject | fillJsonWithTransaction (Transaction const &_txn) |
json_spirit::mObject | fillJsonWithState (State const &_state) |
json_spirit::mObject | fillJsonWithState (State const &_state, eth::AccountMaskMap const &_map) |
json_spirit::mArray | exportLog (eth::LogEntries _logs) |
u256 | toInt (json_spirit::mValue const &_v) |
byte | toByte (json_spirit::mValue const &_v) |
bytes | importByteArray (std::string const &_str) |
bytes | importData (json_spirit::mObject const &_o) |
void | replaceLLLinState (json_spirit::mObject &_o) |
string | compileLLL (string const &_code) |
bytes | importCode (json_spirit::mObject &_o) |
LogEntries | importLog (json_spirit::mArray &_a) |
void | checkOutput (bytesConstRef _output, json_spirit::mObject &_o) |
void | checkStorage (map< u256, u256 > _expectedStore, map< u256, u256 > _resultStore, Address _expectedAddr) |
void | checkLog (LogEntries _resultLogs, LogEntries _expectedLogs) |
void | checkCallCreates (eth::Transactions _resultCallCreates, eth::Transactions _expectedCallCreates) |
void | userDefinedTest (std::function< void(json_spirit::mValue &, bool)> doTests) |
void | executeTests (const string &_name, const string &_testPathAppendix, const string &_fillerPathAppendix, std::function< void(json_spirit::mValue &, bool)> doTests, bool _addFillerSuffix) |
void | copyFile (std::string const &_source, std::string const &_destination) |
RLPStream | createRLPStreamFromTransactionFields (json_spirit::mObject const &_tObj) |
LastHashes | lastHashes (u256 _currentBlockNumber) |
dev::eth::BlockHeader | constructHeader (h256 const &_parentHash, h256 const &_sha3Uncles, Address const &_author, h256 const &_stateRoot, h256 const &_transactionsRoot, h256 const &_receiptsRoot, dev::eth::LogBloom const &_logBloom, u256 const &_difficulty, u256 const &_number, u256 const &_gasLimit, u256 const &_gasUsed, u256 const &_timestamp, bytes const &_extraData) |
void | updateEthashSeal (dev::eth::BlockHeader &_header, h256 const &_mixHash, h64 const &_nonce) |
eth::Network | stringToNetId (std::string const &_netname) |
std::string | compileLLL (std::string const &_code) |
void | checkStorage (std::map< u256, u256 > _expectedStore, std::map< u256, u256 > _resultStore, Address _expectedAddr) |
void | executeTests (const std::string &_name, const std::string &_testPathAppendix, const std::string &_fillerPathAppendix, std::function< void(json_spirit::mValue &, bool)> doTests, bool _addFillerSuffix=true) |
bool | getCommandLineOption (std::string const &_name) |
std::string | getCommandLineArgument (std::string const &_name, bool _require=false) |
std::string | getTestPath () |
int | randomNumber () |
Json::Value | loadJsonFromFile (std::string const &_path) |
std::string | toTestFilePath (std::string const &_filename) |
std::string | getFolder (std::string const &_file) |
std::string | getRandomPath () |
BOOST_AUTO_TEST_CASE (ProxyAccountUseCase) | |
BOOST_AUTO_TEST_CASE (Personal) | |
Variables | |
bigint const | c_max256plus1 = bigint(1) << 256 |
typedef boost::random::discrete_distribution dev::test::boostDescreteDistrib |
Definition at line 39 of file fuzzHelper.h.
typedef boost::random::uniform_int_distribution dev::test::boostIntDistrib |
Definition at line 38 of file fuzzHelper.h.
typedef boost::random::variate_generator<boost::mt19937&, boostIntDistrib > dev::test::boostIntGenerator |
Definition at line 42 of file fuzzHelper.h.
typedef boost::uniform_int<uint64_t> dev::test::boostUint64Distrib |
Definition at line 40 of file fuzzHelper.h.
typedef boost::random::variate_generator<boost::mt19937&, boostUint64Distrib > dev::test::boostUInt64Generator |
Definition at line 44 of file fuzzHelper.h.
typedef boost::random::variate_generator<boost::mt19937&, boostDescreteDistrib > dev::test::boostWeightGenerator |
Definition at line 43 of file fuzzHelper.h.
|
strong |
|
strong |
Enumerator | |
---|---|
Strict | |
Random |
Definition at line 63 of file fuzzHelper.h.
|
strong |
Enumerator | |
---|---|
StateTests | |
BlockChainTests | |
GeneralStateTest | |
Other |
Definition at line 32 of file ImportTest.h.
|
strong |
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashComparisons | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | constructor | ) |
Definition at line 36 of file RangeMask.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | Basic | ) |
Definition at line 37 of file StateUnitTests.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | ProxyAccountUseCase | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | LoadAccountCode | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | Personal | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | simple_unions | ) |
Definition at line 52 of file RangeMask.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashXOR | ) |
Definition at line 54 of file FixedHash.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashOR | ) |
Definition at line 64 of file FixedHash.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | empty_union | ) |
Definition at line 73 of file RangeMask.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashAND | ) |
Definition at line 75 of file FixedHash.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashInvert | ) |
Definition at line 86 of file FixedHash.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | overlapping_unions | ) |
Definition at line 92 of file RangeMask.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashContains | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | complement | ) |
Definition at line 115 of file RangeMask.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | FixedHashIncrement | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | iterator | ) |
Definition at line 132 of file RangeMask.cpp.
dev::test::BOOST_AUTO_TEST_CASE | ( | bcBasicInsert | ) |
dev::test::BOOST_AUTO_TEST_CASE | ( | rndCode | ) |
void dev::test::buildRLP | ( | js::mValue & | _v, |
RLPStream & | _rlp | ||
) |
void dev::test::checkBlocks | ( | TestBlock const & | _blockFromFields, |
TestBlock const & | _blockFromRlp, | ||
string const & | _testname | ||
) |
Definition at line 708 of file BlockChainTests.cpp.
void dev::test::checkCallCreates | ( | eth::Transactions | _resultCallCreates, |
eth::Transactions | _expectedCallCreates | ||
) |
Definition at line 679 of file BlockChainTests.cpp.
void dev::test::checkJsonSectionForInvalidBlock | ( | mObject & | _blObj | ) |
void dev::test::checkLog | ( | LogEntries | _resultLogs, |
LogEntries | _expectedLogs | ||
) |
Definition at line 361 of file TestHelper.cpp.
void dev::test::checkOutput | ( | bytesConstRef | _output, |
json_spirit::mObject & | _o | ||
) |
Definition at line 318 of file TestHelper.cpp.
void dev::test::checkRLPAgainstJson | ( | js::mValue & | v, |
RLP & | u | ||
) |
void dev::test::checkStorage | ( | std::map< u256, u256 > | _expectedStore, |
std::map< u256, u256 > | _resultStore, | ||
Address | _expectedAddr | ||
) |
void dev::test::checkStorage | ( | map< u256, u256 > | _expectedStore, |
map< u256, u256 > | _resultStore, | ||
Address | _expectedAddr | ||
) |
Definition at line 337 of file TestHelper.cpp.
Definition at line 630 of file BlockChainTests.cpp.
std::string dev::test::compileLLL | ( | std::string const & | _code | ) |
string dev::test::compileLLL | ( | string const & | _code | ) |
Definition at line 251 of file TestHelper.cpp.
dev::eth::BlockHeader dev::test::constructHeader | ( | h256 const & | _parentHash, |
h256 const & | _sha3Uncles, | ||
Address const & | _author, | ||
h256 const & | _stateRoot, | ||
h256 const & | _transactionsRoot, | ||
h256 const & | _receiptsRoot, | ||
dev::eth::LogBloom const & | _logBloom, | ||
u256 const & | _difficulty, | ||
u256 const & | _number, | ||
u256 const & | _gasLimit, | ||
u256 const & | _gasUsed, | ||
u256 const & | _timestamp, | ||
bytes const & | _extraData | ||
) |
Definition at line 552 of file TestHelper.cpp.
void dev::test::copyFile | ( | std::string const & | _source, |
std::string const & | _destination | ||
) |
int dev::test::createRandomTest | ( | std::vector< char * > const & | _parameters | ) |
Definition at line 43 of file createRandomTest.cpp.
RLPStream dev::test::createRLPStreamFromTransactionFields | ( | json_spirit::mObject const & | _tObj | ) |
Definition at line 499 of file TestHelper.cpp.
void dev::test::doBlockchainTests | ( | json_spirit::mValue & | _v, |
bool | _fillin | ||
) |
Definition at line 102 of file BlockChainTests.cpp.
void dev::test::doRlpTests | ( | json_spirit::mValue & | v, |
bool | _fillin | ||
) |
void dev::test::doStateTests | ( | json_spirit::mValue & | _v, |
bool | _fillin | ||
) |
Definition at line 42 of file StateTests.cpp.
void dev::test::doTransactionTests | ( | json_spirit::mValue & | _v, |
bool | _fillin | ||
) |
Definition at line 37 of file TransactionTests.cpp.
void dev::test::doVMTests | ( | json_spirit::mValue & | _v, |
bool | _fillin | ||
) |
void dev::test::eraseJsonSectionForInvalidBlock | ( | mObject & | _blObj | ) |
void dev::test::executeGasPricerTest | ( | string const & | name, |
double | _etherPrice, | ||
double | _blockFee, | ||
string const & | bcTestPath, | ||
TransactionPriority | _txPrio, | ||
u256 | _expectedAsk, | ||
u256 | _expectedBid, | ||
eth::Network | _sealEngineNetwork = eth::Network::TransitionnetTest |
||
) |
Definition at line 38 of file GasPricer.cpp.
void dev::test::executeTests | ( | const std::string & | _name, |
const std::string & | _testPathAppendix, | ||
const std::string & | _fillerPathAppendix, | ||
std::function< void(json_spirit::mValue &, bool)> | doTests, | ||
bool | _addFillerSuffix = true |
||
) |
void dev::test::executeTests | ( | const string & | _name, |
const string & | _testPathAppendix, | ||
const string & | _fillerPathAppendix, | ||
std::function< void(json_spirit::mValue &, bool)> | doTests, | ||
bool | _addFillerSuffix | ||
) |
Definition at line 434 of file TestHelper.cpp.
json_spirit::mArray dev::test::exportLog | ( | eth::LogEntries | _logs | ) |
Definition at line 176 of file TestHelper.cpp.
json_spirit::mObject dev::test::fillJsonWithState | ( | State const & | _state | ) |
Definition at line 139 of file TestHelper.cpp.
json_spirit::mObject dev::test::fillJsonWithState | ( | State const & | _state, |
eth::AccountMaskMap const & | _map | ||
) |
Definition at line 145 of file TestHelper.cpp.
json_spirit::mObject dev::test::fillJsonWithTransaction | ( | Transaction const & | _txn | ) |
Definition at line 124 of file TestHelper.cpp.
std::string dev::test::getCommandLineArgument | ( | std::string const & | _name, |
bool | _require = false |
||
) |
bool dev::test::getCommandLineOption | ( | std::string const & | _name | ) |
std::string dev::test::getFolder | ( | std::string const & | _file | ) |
Definition at line 77 of file Common.cpp.
std::string dev::test::getRandomPath | ( | ) |
std::string dev::test::getTestPath | ( | ) |
bytes dev::test::importByteArray | ( | std::string const & | _str | ) |
Definition at line 221 of file TestHelper.cpp.
bytes dev::test::importCode | ( | json_spirit::mObject & | _o | ) |
Definition at line 281 of file TestHelper.cpp.
bytes dev::test::importData | ( | json_spirit::mObject const & | _o | ) |
Definition at line 226 of file TestHelper.cpp.
eth::LogEntries dev::test::importLog | ( | json_spirit::mArray & | _a | ) |
Definition at line 298 of file TestHelper.cpp.
void dev::test::incrementSingleIteration | ( | unsigned | seed | ) |
eth::LastHashes dev::test::lastHashes | ( | u256 | _currentBlockNumber | ) |
Definition at line 544 of file TestHelper.cpp.
Json::Value dev::test::loadJsonFromFile | ( | std::string const & | _path | ) |
Definition at line 58 of file Common.cpp.
std::string dev::test::netIdToString | ( | eth::Network | _netId | ) |
std::ostream& dev::test::operator<< | ( | std::ostream & | out, |
Stats::clock::duration const & | d | ||
) |
void dev::test::overwriteBlockHeaderForTest | ( | mObject const & | _blObj, |
TestBlock & | _block, | ||
ChainBranch const & | _chainBranch | ||
) |
Definition at line 413 of file BlockChainTests.cpp.
void dev::test::overwriteUncleHeaderForTest | ( | mObject & | _uncleHeaderObj, |
TestBlock & | _uncle, | ||
vector< TestBlock > const & | _uncles, | ||
ChainBranch const & | _chainBranch | ||
) |
void dev::test::overwriteUncleHeaderForTest | ( | mObject & | uncleHeaderObj, |
TestBlock & | uncle, | ||
std::vector< TestBlock > const & | uncles, | ||
ChainBranch const & | _chainBranch | ||
) |
Definition at line 504 of file BlockChainTests.cpp.
int dev::test::randomNumber | ( | ) |
Definition at line 51 of file Common.cpp.
void dev::test::replaceLLLinState | ( | json_spirit::mObject & | _o | ) |
Definition at line 237 of file TestHelper.cpp.
eth::Network dev::test::stringToNetId | ( | string const & | _netname | ) |
Definition at line 107 of file TestHelper.cpp.
eth::Network dev::test::stringToNetId | ( | std::string const & | _netname | ) |
h256s dev::test::subs | ( | bytesConstRef | _node | ) |
Definition at line 107 of file BlockChainInsert.cpp.
void dev::test::syncStateTrie | ( | bytesConstRef | _block, |
OverlayDB const & | _dbSource, | ||
OverlayDB & | _dbDest | ||
) |
Definition at line 126 of file BlockChainInsert.cpp.
byte dev::test::toByte | ( | json_spirit::mValue const & | _v | ) |
Definition at line 208 of file TestHelper.cpp.
u256 dev::test::toInt | ( | json_spirit::mValue const & | _v | ) |
Definition at line 195 of file TestHelper.cpp.
std::string dev::test::toTestFilePath | ( | std::string const & | _filename | ) |
Definition at line 72 of file Common.cpp.
void dev::test::updateEthashSeal | ( | dev::eth::BlockHeader & | _header, |
h256 const & | _mixHash, | ||
h64 const & | _nonce | ||
) |
void dev::test::userDefinedTest | ( | std::function< void(json_spirit::mValue &, bool)> | doTests | ) |
Definition at line 386 of file TestHelper.cpp.
mObject dev::test::writeBlockHeaderToJson | ( | BlockHeader const & | _bi | ) |
Definition at line 657 of file BlockChainTests.cpp.
mArray dev::test::writeTransactionsToJson | ( | TransactionQueue const & | _txsQueue | ) |
Definition at line 645 of file BlockChainTests.cpp.
Definition at line 61 of file TestHelper.h.