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:
@@ -886,7 +886,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
// Empty list of tokens to delete.
|
||||
{
|
||||
json::Value jv = token::cancelOffer(buyer);
|
||||
jv[sfNFTokenOffers.jsonName] = json::ArrayValue;
|
||||
jv[sfNFTokenOffers.jsonName] = json::ValueType::Array;
|
||||
env(jv, Ter(temMALFORMED));
|
||||
env.close();
|
||||
BEAST_EXPECT(ownerCount(env, buyer) == 1);
|
||||
@@ -1058,7 +1058,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
// A buy offer may not contain a sfNFTokenBrokerFee field.
|
||||
{
|
||||
json::Value jv = token::acceptBuyOffer(buyer, noXferOfferIndex);
|
||||
jv[sfNFTokenBrokerFee.jsonName] = STAmount(500000).getJson(JsonOptions::KNone);
|
||||
jv[sfNFTokenBrokerFee.jsonName] = STAmount(500000).getJson(JsonOptions::Values::None);
|
||||
env(jv, Ter(temMALFORMED));
|
||||
env.close();
|
||||
BEAST_EXPECT(ownerCount(env, buyer) == buyerCount);
|
||||
@@ -1067,7 +1067,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
// A sell offer may not contain a sfNFTokenBrokerFee field.
|
||||
{
|
||||
json::Value jv = token::acceptSellOffer(buyer, noXferOfferIndex);
|
||||
jv[sfNFTokenBrokerFee.jsonName] = STAmount(500000).getJson(JsonOptions::KNone);
|
||||
jv[sfNFTokenBrokerFee.jsonName] = STAmount(500000).getJson(JsonOptions::Values::None);
|
||||
env(jv, Ter(temMALFORMED));
|
||||
env.close();
|
||||
BEAST_EXPECT(ownerCount(env, buyer) == buyerCount);
|
||||
@@ -4489,7 +4489,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
int expectMarkerCount,
|
||||
int line) {
|
||||
int markerCount = 0;
|
||||
json::Value allOffers(json::ArrayValue);
|
||||
json::Value allOffers(json::ValueType::Array);
|
||||
std::string marker;
|
||||
|
||||
// The do/while collects results until no marker is returned.
|
||||
@@ -6101,7 +6101,8 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
// transaction
|
||||
auto verifyNFTokenID = [&](uint256 const& actualNftID) {
|
||||
// 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];
|
||||
@@ -6121,7 +6122,8 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
// changed in the most recent NFTokenCancelOffer transaction
|
||||
auto verifyNFTokenIDsInCancelOffer = [&](std::vector<uint256> actualNftIDs) {
|
||||
// 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];
|
||||
@@ -6159,7 +6161,8 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
// changed in the most recent NFTokenCreateOffer tx
|
||||
auto verifyNFTokenOfferID = [&](uint256 const& offerID) {
|
||||
// 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