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:
@@ -39,7 +39,7 @@ public:
|
||||
void test_noReserve()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
|
||||
// Pay alice enough to meet the initial reserve, but not enough to
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
void test_signerListSet()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
void test_phantomSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
void test_fee ()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
void test_misorderedSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
void test_masterSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
Account const becky {"becky", KeyType::secp256k1};
|
||||
Account const cheri {"cheri", KeyType::ed25519};
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
void test_regularSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const cheri {"cheri", KeyType::secp256k1};
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
void test_regularSignersUsingSubmitMulti()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const cheri {"cheri", KeyType::secp256k1};
|
||||
@@ -618,7 +618,7 @@ public:
|
||||
void test_heterogeneousSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const cheri {"cheri", KeyType::secp256k1};
|
||||
@@ -733,7 +733,7 @@ public:
|
||||
void test_keyDisable()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
|
||||
@@ -808,7 +808,7 @@ public:
|
||||
void test_regKey()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
env.fund(XRP(1000), alice);
|
||||
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
void test_txTypes()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const zelda {"zelda", KeyType::secp256k1};
|
||||
@@ -924,7 +924,7 @@ public:
|
||||
// Verify that the text returned for signature failures is correct.
|
||||
using namespace jtx;
|
||||
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Env env(*this, with_only_features(featureMultiSign));
|
||||
|
||||
// lambda that submits an STTx and returns the resulting JSON.
|
||||
auto submitSTTx = [&env] (STTx const& stx)
|
||||
@@ -1058,7 +1058,7 @@ public:
|
||||
void test_noMultiSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env {*this, with_features(featureMultiSign)};
|
||||
Env env {*this, with_only_features(featureMultiSign)};
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
Account const becky {"becky", KeyType::secp256k1};
|
||||
env.fund(XRP(1000), alice, becky);
|
||||
|
||||
Reference in New Issue
Block a user