|
xrpld
|


Public Member Functions | |
| AmendmentTable_test () | |
| std::unique_ptr< AmendmentTable > | makeTable (Application &app, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed) |
| std::unique_ptr< AmendmentTable > | makeTable (test::jtx::Env &env, std::chrono::seconds majorityTime, std::vector< AmendmentTable::FeatureInfo > const &supported, Section const &enabled, Section const &vetoed) |
| std::unique_ptr< AmendmentTable > | makeTable (test::jtx::Env &env, std::chrono::seconds majorityTime) |
| void | testConstruct () |
| void | testGet () |
| void | testBadConfig () |
| void | testEnableVeto () |
| void | testNoOnUnknown (FeatureBitset const &feat) |
| void | testNoOnVetoed (FeatureBitset const &feat) |
| void | testVoteEnable (FeatureBitset const &feat) |
| void | testDetectMajority (FeatureBitset const &feat) |
| void | testLostMajority (FeatureBitset const &feat) |
| void | testChangedUNL (FeatureBitset const &feat) |
| void | testValidatorFlapping (FeatureBitset const &feat) |
| void | testHasUnsupported () |
| void | testFeature (FeatureBitset const &feat) |
| void | run () override |
| Runs the suite. | |
| template<class = void> | |
| void | operator() (Runner &r) |
| Invokes the test using the specified runner. | |
| template<class = void> | |
| void | pass () |
| Record a successful test condition. | |
| template<class F, class String> | |
| bool | except (F &&f, String const &reason) |
| template<class F> | |
| bool | except (F &&f) |
| template<class E, class F, class String> | |
| bool | except (F &&f, String const &reason) |
| template<class E, class F> | |
| bool | except (F &&f) |
| template<class F, class String> | |
| bool | unexcept (F &&f, String const &reason) |
| template<class F> | |
| bool | unexcept (F &&f) |
| std::string const & | arg () const |
| Return the argument associated with the runner. | |
| template<class Condition, class String> | |
| bool | unexpected (Condition shouldBeFalse, String const &reason) |
| template<class Condition> | |
| bool | unexpected (Condition shouldBeFalse) |
| template<class String> | |
| void | fail (String const &reason, char const *file, int line) |
| Record a failure. | |
| template<class = void> | |
| void | fail (std::string const &reason="") |
| template<class Condition> | |
| bool | expect (Condition const &shouldBeTrue) |
| Evaluate a test condition. | |
| template<class Condition, class String> | |
| bool | expect (Condition const &shouldBeTrue, String const &reason) |
| template<class Condition> | |
| bool | expect (Condition const &shouldBeTrue, char const *file, int line) |
| template<class Condition, class String> | |
| bool | expect (Condition const &shouldBeTrue, String const &reason, char const *file, int line) |
Static Public Member Functions | |
| static std::vector< std::pair< PublicKey, SecretKey > > | makeValidators (int num, std::unique_ptr< AmendmentTable > const &table) |
| static NetClock::time_point | hourTime (std::chrono::hours h) |
| static void | doRound (Rules const &rules, AmendmentTable &table, std::chrono::hours hour, std::vector< std::pair< PublicKey, SecretKey > > const &validators, std::vector< std::pair< uint256, int > > const &votes, std::vector< uint256 > &ourVotes, std::set< uint256 > &enabled, majorityAmendments_t &majority) |
| static Suite * | thisSuite () |
| Returns the "current" running suite. | |
Public Attributes | |
| LogOs< char > | log |
| Logging output stream. | |
| TestcaseT | testcase |
| Memberspace for declaring test cases. | |
Private Member Functions | |
| std::unique_ptr< Config > | makeConfig () |
| void | propagateAbort () const |
Static Private Member Functions | |
| static uint256 | amendmentId (std::string in) |
| static Section | makeSection (std::string const &name, std::vector< std::string > const &amendments) |
| static Section | makeSection (std::vector< std::string > const &amendments) |
| static Section | makeSection (uint256 const &amendment) |
| static std::vector< AmendmentTable::FeatureInfo > | makeFeatureInfo (std::vector< std::string > const &amendments, VoteBehavior voteBehavior) |
| static std::vector< AmendmentTable::FeatureInfo > | makeDefaultYes (std::vector< std::string > const &amendments) |
| static std::vector< AmendmentTable::FeatureInfo > | makeDefaultYes (uint256 const amendment) |
| static std::vector< AmendmentTable::FeatureInfo > | makeDefaultNo (std::vector< std::string > const &amendments) |
| static std::vector< AmendmentTable::FeatureInfo > | makeObsolete (std::vector< std::string > const &amendments) |
| template<class Arg, class... Args> | |
| static size_t | totalsize (std::vector< Arg > const &src, Args const &... args) |
| template<class Arg, class... Args> | |
| static void | combineArg (std::vector< Arg > &dest, std::vector< Arg > const &src, Args const &... args) |
| template<class Arg, class... Args> | |
| static std::vector< Arg > | combine (std::vector< Arg > left, std::vector< Arg > const &right, Args const &... args) |
| static Suite ** | pThisSuite () |
Private Attributes | |
| std::vector< std::string > const | yes_ {"g", "i", "k", "m", "o", "q", "r", "s", "t", "u"} |
| std::vector< std::string > const | enabled_ {"b", "d", "f", "h", "j", "l", "n", "p"} |
| std::vector< std::string > const | vetoed_ {"a", "c", "e"} |
| std::vector< std::string > const | obsolete_ {"0", "1", "2"} |
| std::vector< std::string > const | allSupported_ {combine(yes_, enabled_, vetoed_, obsolete_)} |
| std::vector< std::string > const | unsupported_ {"v", "w", "x"} |
| std::vector< std::string > const | unsupportedMajority_ {"y", "z"} |
| Section const | emptySection_ |
| std::vector< AmendmentTable::FeatureInfo > const | emptyYes_ |
| test::SuiteJournal | journal_ |
| bool | abort_ = false |
| bool | aborted_ = false |
| Runner * | runner_ = nullptr |
Definition at line 44 of file AmendmentTable_test.cpp.
| xrpl::AmendmentTable_test::AmendmentTable_test | ( | ) |
Definition at line 182 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 48 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 60 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 69 of file AmendmentTable_test.cpp.
Definition at line 75 of file AmendmentTable_test.cpp.
|
private |
Definition at line 83 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 92 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 104 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 110 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 118 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 124 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 131 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 140 of file AmendmentTable_test.cpp.
|
staticprivate |
Definition at line 150 of file AmendmentTable_test.cpp.
| std::unique_ptr< AmendmentTable > xrpl::AmendmentTable_test::makeTable | ( | Application & | app, |
| std::chrono::seconds | majorityTime, | ||
| std::vector< AmendmentTable::FeatureInfo > const & | supported, | ||
| Section const & | enabled, | ||
| Section const & | vetoed ) |
Definition at line 187 of file AmendmentTable_test.cpp.
| std::unique_ptr< AmendmentTable > xrpl::AmendmentTable_test::makeTable | ( | test::jtx::Env & | env, |
| std::chrono::seconds | majorityTime, | ||
| std::vector< AmendmentTable::FeatureInfo > const & | supported, | ||
| Section const & | enabled, | ||
| Section const & | vetoed ) |
Definition at line 198 of file AmendmentTable_test.cpp.
| std::unique_ptr< AmendmentTable > xrpl::AmendmentTable_test::makeTable | ( | test::jtx::Env & | env, |
| std::chrono::seconds | majorityTime ) |
Definition at line 209 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testConstruct | ( | ) |
Definition at line 225 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testGet | ( | ) |
Definition at line 254 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testBadConfig | ( | ) |
Definition at line 293 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testEnableVeto | ( | ) |
Definition at line 393 of file AmendmentTable_test.cpp.
|
static |
Definition at line 466 of file AmendmentTable_test.cpp.
|
static |
Definition at line 482 of file AmendmentTable_test.cpp.
|
static |
Definition at line 489 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testNoOnUnknown | ( | FeatureBitset const & | feat | ) |
Definition at line 580 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testNoOnVetoed | ( | FeatureBitset const & | feat | ) |
Definition at line 658 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testVoteEnable | ( | FeatureBitset const & | feat | ) |
Definition at line 718 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testDetectMajority | ( | FeatureBitset const & | feat | ) |
Definition at line 797 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testLostMajority | ( | FeatureBitset const & | feat | ) |
Definition at line 862 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testChangedUNL | ( | FeatureBitset const & | feat | ) |
Definition at line 935 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testValidatorFlapping | ( | FeatureBitset const & | feat | ) |
Definition at line 1082 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testHasUnsupported | ( | ) |
Definition at line 1163 of file AmendmentTable_test.cpp.
| void xrpl::AmendmentTable_test::testFeature | ( | FeatureBitset const & | feat | ) |
Definition at line 1201 of file AmendmentTable_test.cpp.
|
overridevirtual |
Runs the suite.
Implements beast::unit_test::Suite.
Definition at line 1213 of file AmendmentTable_test.cpp.
|
staticinherited |
|
inherited |
Invokes the test using the specified runner.
Data members are set up here instead of the constructor as a convenience to writing the derived class to avoid repetition of forwarded constructor arguments to the base. Normally this is called by the framework for you.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Evaluate a test condition.
This function provides improved logging by incorporating the file name and line number into the reported output on failure, as well as additional text specified by the caller.
| shouldBeTrue | The condition to test. The condition is evaluated in a boolean context. |
| reason | Optional added text to output on a failure. |
| file | The source code file where the test failed. |
| line | The source code line number where the test failed. |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticprivateinherited |
|
privateinherited |
|
private |
Definition at line 168 of file AmendmentTable_test.cpp.
|
private |
Definition at line 169 of file AmendmentTable_test.cpp.
|
private |
Definition at line 170 of file AmendmentTable_test.cpp.
|
private |
Definition at line 171 of file AmendmentTable_test.cpp.
|
private |
Definition at line 172 of file AmendmentTable_test.cpp.
|
private |
Definition at line 173 of file AmendmentTable_test.cpp.
|
private |
Definition at line 174 of file AmendmentTable_test.cpp.
|
private |
Definition at line 176 of file AmendmentTable_test.cpp.
|
private |
Definition at line 177 of file AmendmentTable_test.cpp.
|
private |
Definition at line 179 of file AmendmentTable_test.cpp.
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
inherited |