Minimize use of jtx::with_only_features (RIPD-1515):

In order to automatically run unit tests with newly created
amendments, prefer to start with jtx::supported_features() and
then subtract unwanted features.

These changes identified a few bugs that were hiding in
amendments.  One of those bugs, in FlowCross, is not yet fixed.
By uncommenting the test in CrossingLimits_test.cpp you can see
failures relating to that bug.  Since FlowCross is not yet
enabled on the network we can fix the bug at our convenience.
This commit is contained in:
Scott Schurr
2017-08-16 18:30:55 -07:00
committed by seelabs
parent aa76632bb3
commit 3523cee63d
30 changed files with 826 additions and 658 deletions

View File

@@ -116,7 +116,7 @@ struct Directory_test : public beast::unit_test::suite
{
testcase ("Directory Ordering (with 'SortedDirectories' amendment)");
Env env(*this, with_only_features(featureSortedDirectories));
Env env(*this);
env.fund(XRP(10000000), alice, gw);
for (std::size_t i = 1; i <= 400; ++i)
@@ -184,8 +184,7 @@ struct Directory_test : public beast::unit_test::suite
beast::xor_shift_engine eng;
Env env(*this,
with_only_features(featureSortedDirectories, featureMultiSign));
Env env(*this);
env.fund(XRP(1000000), alice, charlie, gw);
env.close();
@@ -289,7 +288,7 @@ struct Directory_test : public beast::unit_test::suite
testcase("RIPD-1353 Empty Offer Directories");
using namespace jtx;
Env env(*this, with_only_features(featureSortedDirectories));
Env env(*this);
auto const gw = Account{"gateway"};
auto const alice = Account{"alice"};
@@ -349,7 +348,7 @@ struct Directory_test : public beast::unit_test::suite
testcase("Empty Chain on Delete");
using namespace jtx;
Env env(*this, with_only_features(featureSortedDirectories));
Env env(*this);
auto const gw = Account{"gateway"};
auto const alice = Account{"alice"};