diff --git a/src/test/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index e7a8ebfd73..12494939c8 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -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)); } } diff --git a/src/test/jtx/Env.h b/src/test/jtx/Env.h index b332a76d6b..523a48cb97 100644 --- a/src/test/jtx/Env.h +++ b/src/test/jtx/Env.h @@ -792,9 +792,6 @@ Env::rpc(std::string const& cmd, Args&&... args) std::forward(args)...); } -extern std::string blob257; -extern std::string blob1025; - } // namespace jtx } // namespace test } // namespace ripple diff --git a/src/test/jtx/impl/Env.cpp b/src/test/jtx/impl/Env.cpp index b4c1e0d34e..1a8bdada2b 100644 --- a/src/test/jtx/impl/Env.cpp +++ b/src/test/jtx/impl/Env.cpp @@ -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