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:
@@ -73,7 +73,8 @@ class CheckMPT_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();
|
||||
@@ -85,8 +86,8 @@ class CheckMPT_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
|
||||
@@ -928,7 +929,7 @@ class CheckMPT_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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user