mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 18:26:51 +00:00
refactor: Enable clang-tidy readability-identifier-naming check (#6571)
This commit is contained in:
@@ -20,19 +20,19 @@
|
||||
|
||||
namespace xrpl::test {
|
||||
|
||||
struct SetAuth_test : public beast::unit_test::suite
|
||||
struct SetAuth_test : public beast::unit_test::Suite
|
||||
{
|
||||
// Set just the tfSetfAuth flag on a trust line
|
||||
// If the trust line does not exist, then it should
|
||||
// be created under the new rules.
|
||||
static Json::Value
|
||||
static json::Value
|
||||
auth(jtx::Account const& account, jtx::Account const& dest, std::string const& currency)
|
||||
{
|
||||
using namespace jtx;
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[jss::Account] = account.human();
|
||||
jv[jss::LimitAmount] =
|
||||
STAmount(Issue{to_currency(currency), dest}).getJson(JsonOptions::none);
|
||||
STAmount(Issue{toCurrency(currency), dest}).getJson(JsonOptions::KNone);
|
||||
jv[jss::TransactionType] = jss::TrustSet;
|
||||
jv[jss::Flags] = tfSetfAuth;
|
||||
return jv;
|
||||
@@ -43,7 +43,7 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
{
|
||||
using namespace jtx;
|
||||
auto const gw = Account("gw");
|
||||
auto const USD = gw["USD"];
|
||||
auto const usd = gw["USD"];
|
||||
|
||||
Env env(*this);
|
||||
|
||||
@@ -51,21 +51,21 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
env(fset(gw, asfRequireAuth));
|
||||
env.close();
|
||||
env(auth(gw, "alice", "USD"));
|
||||
BEAST_EXPECT(env.le(keylet::line(Account("alice").id(), gw.id(), USD.currency)));
|
||||
env(trust("alice", USD(1000)));
|
||||
env(trust("bob", USD(1000)));
|
||||
env(pay(gw, "alice", USD(100)));
|
||||
env(pay(gw, "bob", USD(100)),
|
||||
ter(tecPATH_DRY)); // Should be terNO_AUTH
|
||||
env(pay("alice", "bob", USD(50)),
|
||||
ter(tecPATH_DRY)); // Should be terNO_AUTH
|
||||
BEAST_EXPECT(env.le(keylet::line(Account("alice").id(), gw.id(), usd.currency)));
|
||||
env(trust("alice", usd(1000)));
|
||||
env(trust("bob", usd(1000)));
|
||||
env(pay(gw, "alice", usd(100)));
|
||||
env(pay(gw, "bob", usd(100)),
|
||||
Ter(tecPATH_DRY)); // Should be terNO_AUTH
|
||||
env(pay("alice", "bob", usd(50)),
|
||||
Ter(tecPATH_DRY)); // Should be terNO_AUTH
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
using namespace jtx;
|
||||
auto const sa = testable_amendments();
|
||||
auto const sa = testableAmendments();
|
||||
testAuth(sa - featurePermissionedDEX);
|
||||
testAuth(sa);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user