mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-18 21:10:02 +00:00
Merge remote-tracking branch 'upstream/develop' into sponsor
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <test/jtx/CaptureLogs.h>
|
||||
#include <test/jtx/delegate.h>
|
||||
|
||||
#include <xrpl/ledger/helpers/DelegateHelpers.h>
|
||||
#include <xrpl/protocol/Feature.h>
|
||||
#include <xrpl/protocol/Permissions.h>
|
||||
|
||||
@@ -1619,8 +1620,8 @@ class Delegate_test : public beast::unit_test::suite
|
||||
Account const alice{"alice"};
|
||||
Account const bob{"bob"};
|
||||
Account const carol{"carol"};
|
||||
Account daria{"daria"};
|
||||
Account edward{"edward"};
|
||||
Account const daria{"daria"};
|
||||
Account const edward{"edward"};
|
||||
env.fund(XRP(100000), alice, bob, carol, daria, edward);
|
||||
env.close();
|
||||
|
||||
@@ -1655,9 +1656,9 @@ class Delegate_test : public beast::unit_test::suite
|
||||
Account const alice{"alice"};
|
||||
Account const bob{"bob"};
|
||||
Account const carol{"carol"};
|
||||
Account daria = Account{"daria"};
|
||||
Account edward = Account{"edward"};
|
||||
Account fred = Account{"fred"};
|
||||
Account const daria{"daria"};
|
||||
Account const edward{"edward"};
|
||||
Account const fred{"fred"};
|
||||
env.fund(XRP(100000), alice, bob, carol, daria, edward, fred);
|
||||
env.close();
|
||||
|
||||
@@ -1859,6 +1860,21 @@ class Delegate_test : public beast::unit_test::suite
|
||||
"\n Action: Verify security requirements to interact with Delegation feature");
|
||||
}
|
||||
|
||||
void
|
||||
testDelegateUtilsNullptrCheck()
|
||||
{
|
||||
testcase("DelegateUtils nullptr check");
|
||||
|
||||
// checkTxPermission nullptr check
|
||||
STTx const tx{ttPAYMENT, [](STObject&) {}};
|
||||
BEAST_EXPECT(checkTxPermission(nullptr, tx) == terNO_DELEGATE_PERMISSION);
|
||||
|
||||
// loadGranularPermission nullptr check
|
||||
std::unordered_set<GranularPermissionType> granularPermissions;
|
||||
loadGranularPermission(nullptr, ttPAYMENT, granularPermissions);
|
||||
BEAST_EXPECT(granularPermissions.empty());
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
@@ -1884,6 +1900,7 @@ class Delegate_test : public beast::unit_test::suite
|
||||
testPermissionValue(all);
|
||||
testTxRequireFeatures(all);
|
||||
testTxDelegableCount();
|
||||
testDelegateUtilsNullptrCheck();
|
||||
}
|
||||
};
|
||||
BEAST_DEFINE_TESTSUITE(Delegate, app, xrpl);
|
||||
|
||||
Reference in New Issue
Block a user