mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Unit tests don't enable Tickets or SHAMapV2 by default:
Both Tickets and SHAMapV2 have been around for a while and don't look like they will be enabled on the network soon. So they are removed from the supportedAmendments list. This prevents Env from automatically testing with Tickets or SHAMapV2 enabled, although testing with those features can still be explicitly specified. Drive-by cleanups: o supportedAmendments() returns a const reference rather than a fresh vector on each call. o supportedAmendments() implementation moved from Amendments.cpp to Feature.cpp. Amendments.cpp deleted. o supportedAmendments() declared in Feature.h. All other declarations deleted. o preEnabledAmendments() removed, since it was empty and only used in one place. It will be easy to re-add when it is needed. o jtx::all_features_except() renamed to jtx::supported_features_except(), which is more descriptive. o jtx::all_amendments() renamed to jxt::supported_amendments() o jtx::with_features() renamed to with_only_features() o Env_test.cpp adjusted since featureTickets is no longer automatically enabled for unit tests.
This commit is contained in:
@@ -51,7 +51,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
testcase ("Payment to Nonexistent Account");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
env (pay (env.master, "alice", XRP(1)), ter(tecNO_DST_INSUF_XRP));
|
||||
env.close();
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
testcase ("Direct Payment, Ripple");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
Account alice {"alice"};
|
||||
Account bob {"bob"};
|
||||
|
||||
@@ -210,7 +210,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
(subscribe ? "With " : "Without ") + " Subscribe");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
auto wsc = test::makeWSClient(env.app().config());
|
||||
Account gw {"gateway"};
|
||||
Account alice {"alice"};
|
||||
@@ -288,7 +288,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
testcase ("Payments With Paths and Fees");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
Account gw {"gateway"};
|
||||
Account alice {"alice"};
|
||||
Account bob {"bob"};
|
||||
@@ -336,7 +336,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
testcase ("Indirect Payment");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
Account gw {"gateway"};
|
||||
Account alice {"alice"};
|
||||
Account bob {"bob"};
|
||||
@@ -378,7 +378,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
(with_rate ? "With " : "Without ") + " Xfer Fee, ");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
Account gw {"gateway"};
|
||||
Account amazon {"amazon"};
|
||||
Account alice {"alice"};
|
||||
@@ -443,7 +443,7 @@ class TrustAndBalance_test : public beast::unit_test::suite
|
||||
testcase ("Set Invoice ID on Payment");
|
||||
using namespace test::jtx;
|
||||
|
||||
Env env {*this, with_features(fs)};
|
||||
Env env {*this, with_only_features(fs)};
|
||||
Account alice {"alice"};
|
||||
auto wsc = test::makeWSClient(env.app().config());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user