mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 01:06:48 +00:00
refactor: Use more scoped enums (#7086)
This commit is contained in:
@@ -77,7 +77,8 @@ class Check_test : public beast::unit_test::Suite
|
||||
verifyDeliveredAmount(test::jtx::Env& env, STAmount const& amount)
|
||||
{
|
||||
// Get the hash for the most recent transaction.
|
||||
std::string const txHash{env.tx()->getJson(JsonOptions::KNone)[jss::hash].asString()};
|
||||
std::string const txHash{
|
||||
env.tx()->getJson(JsonOptions::Values::None)[jss::hash].asString()};
|
||||
|
||||
// Verify DeliveredAmount and delivered_amount metadata are correct.
|
||||
env.close();
|
||||
@@ -89,8 +90,8 @@ class Check_test : public beast::unit_test::Suite
|
||||
|
||||
// DeliveredAmount and delivered_amount should both be present and
|
||||
// equal amount.
|
||||
BEAST_EXPECT(meta[sfDeliveredAmount.jsonName] == amount.getJson(JsonOptions::KNone));
|
||||
BEAST_EXPECT(meta[jss::delivered_amount] == amount.getJson(JsonOptions::KNone));
|
||||
BEAST_EXPECT(meta[sfDeliveredAmount.jsonName] == amount.getJson(JsonOptions::Values::None));
|
||||
BEAST_EXPECT(meta[jss::delivered_amount] == amount.getJson(JsonOptions::Values::None));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1326,7 +1327,7 @@ class Check_test : public beast::unit_test::Suite
|
||||
// Both Amount and DeliverMin present.
|
||||
{
|
||||
json::Value tx{check::cash(bob, chkId, amount)};
|
||||
tx[sfDeliverMin.jsonName] = amount.getJson(JsonOptions::KNone);
|
||||
tx[sfDeliverMin.jsonName] = amount.getJson(JsonOptions::Values::None);
|
||||
env(tx, Ter(temMALFORMED));
|
||||
env.close();
|
||||
}
|
||||
@@ -1727,7 +1728,8 @@ class Check_test : public beast::unit_test::Suite
|
||||
env(check::cash(bob, chkId, check::DeliverMin(XRP(100))));
|
||||
|
||||
// Get the hash for the most recent transaction.
|
||||
std::string const txHash{env.tx()->getJson(JsonOptions::KNone)[jss::hash].asString()};
|
||||
std::string const txHash{
|
||||
env.tx()->getJson(JsonOptions::Values::None)[jss::hash].asString()};
|
||||
|
||||
env.close();
|
||||
json::Value const meta = env.rpc("tx", txHash)[jss::result][jss::meta];
|
||||
|
||||
Reference in New Issue
Block a user