remove blob constants

This commit is contained in:
John Freeman
2024-12-06 08:15:16 -06:00
committed by Bronek Kozicki
parent 12646cb89e
commit 54d511b0db
3 changed files with 6 additions and 9 deletions

View File

@@ -173,6 +173,7 @@ class Vault_test : public beast::unit_test::suite
PrettyAsset asset = issuer["IOU"];
env.trust(asset(1000), depositor);
env(pay(issuer, depositor, asset(1000)));
env.close();
testSequence(env, issuer, owner, depositor, vault, asset);
}
@@ -183,6 +184,7 @@ class Vault_test : public beast::unit_test::suite
PrettyAsset asset = mptt.issuanceID();
mptt.authorize({.account = depositor});
env(pay(issuer, depositor, asset(1000)));
env.close();
testSequence(env, issuer, owner, depositor, vault, asset);
}
}
@@ -224,14 +226,16 @@ class Vault_test : public beast::unit_test::suite
SUBCASE("data too large")
{
tx[sfData] = blob257;
// A hexadecimal string of 257 bytes.
tx[sfData] = std::string(514, 'A');
env(tx, ter(temSTRING_TOO_LARGE));
}
SUBCASE("metadata too large")
{
// This metadata is for the share token.
tx[sfMPTokenMetadata] = blob1025;
// A hexadecimal string of 1025 bytes.
tx[sfMPTokenMetadata] = std::string(2050, 'B');
env(tx, ter(temSTRING_TOO_LARGE));
}
}

View File

@@ -792,9 +792,6 @@ Env::rpc(std::string const& cmd, Args&&... args)
std::forward<Args>(args)...);
}
extern std::string blob257;
extern std::string blob1025;
} // namespace jtx
} // namespace test
} // namespace ripple

View File

@@ -586,10 +586,6 @@ Env::disableFeature(uint256 const feature)
app().config().features.erase(feature);
}
// The strings are hexadecimal. 1 byte = 2 hexadecimal characters.
std::string blob257(514, 'A');
std::string blob1025(2050, 'B');
} // namespace jtx
} // namespace test
} // namespace ripple