refactor: Use more scoped enums (#7086)

This commit is contained in:
Alex Kremer
2026-05-11 16:39:48 +01:00
committed by GitHub
parent 779b49cd93
commit cdee9a675c
379 changed files with 2771 additions and 2864 deletions

View File

@@ -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();
}