mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Format first-party source according to .clang-format
This commit is contained in:
committed by
manojsdoshi
parent
65dfc5d19e
commit
50760c6935
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <test/jtx.h>
|
||||
#include <ripple/protocol/Feature.h>
|
||||
#include <ripple/protocol/jss.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
@@ -29,23 +29,24 @@ 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
|
||||
auth (jtx::Account const& account,
|
||||
static Json::Value
|
||||
auth(
|
||||
jtx::Account const& account,
|
||||
jtx::Account const& dest,
|
||||
std::string const& currency)
|
||||
std::string const& currency)
|
||||
{
|
||||
using namespace jtx;
|
||||
Json::Value jv;
|
||||
jv[jss::Account] = account.human();
|
||||
jv[jss::LimitAmount] = STAmount(
|
||||
{ to_currency(currency), dest }).getJson(JsonOptions::none);
|
||||
jv[jss::LimitAmount] =
|
||||
STAmount({to_currency(currency), dest}).getJson(JsonOptions::none);
|
||||
jv[jss::TransactionType] = jss::TrustSet;
|
||||
jv[jss::Flags] = tfSetfAuth;
|
||||
return jv;
|
||||
}
|
||||
|
||||
void testAuth(FeatureBitset features)
|
||||
void
|
||||
testAuth(FeatureBitset features)
|
||||
{
|
||||
using namespace jtx;
|
||||
auto const gw = Account("gw");
|
||||
@@ -56,17 +57,19 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
env.fund(XRP(100000), "alice", "bob", gw);
|
||||
env(fset(gw, asfRequireAuth));
|
||||
env(auth(gw, "alice", "USD"));
|
||||
BEAST_EXPECT(env.le(
|
||||
keylet::line(Account("alice").id(),
|
||||
gw.id(), USD.currency)));
|
||||
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
|
||||
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
|
||||
void
|
||||
run() override
|
||||
{
|
||||
using namespace jtx;
|
||||
auto const sa = supported_amendments();
|
||||
@@ -75,7 +78,7 @@ struct SetAuth_test : public beast::unit_test::suite
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(SetAuth,test,ripple);
|
||||
BEAST_DEFINE_TESTSUITE(SetAuth, test, ripple);
|
||||
|
||||
} // test
|
||||
} // ripple
|
||||
} // namespace test
|
||||
} // namespace ripple
|
||||
|
||||
Reference in New Issue
Block a user