diff --git a/src/test/rpc/AccountObjects_test.cpp b/src/test/rpc/AccountObjects_test.cpp index 319cfae1a..63205d141 100644 --- a/src/test/rpc/AccountObjects_test.cpp +++ b/src/test/rpc/AccountObjects_test.cpp @@ -25,7 +25,7 @@ #include -#include +#include namespace ripple { namespace test { @@ -502,11 +502,14 @@ public: params[jss::deletion_blockers_only] = true; auto resp = env.rpc("json", "account_objects", to_string(params)); - std::set const expectedLedgerTypes{ - {jss::Escrow.c_str(), - jss::Check.c_str(), - jss::RippleState.c_str(), - jss::PayChannel.c_str()}}; + std::vector const expectedLedgerTypes = [] { + std::vector v{jss::Escrow.c_str(), + jss::Check.c_str(), + jss::RippleState.c_str(), + jss::PayChannel.c_str()}; + std::sort(v.begin(), v.end()); + return v; + }(); std::uint32_t const expectedAccountObjects{ static_cast(std::size(expectedLedgerTypes)) @@ -515,11 +518,14 @@ public: if (BEAST_EXPECT(acct_objs_is_size(resp, expectedAccountObjects))) { auto const& aobjs = resp[jss::result][jss::account_objects]; - std::set gotLedgerTypes; + std::vector gotLedgerTypes; + gotLedgerTypes.reserve(expectedAccountObjects); for (std::uint32_t i = 0; i < expectedAccountObjects; ++i) { - gotLedgerTypes.insert(aobjs[i]["LedgerEntryType"].asString()); + gotLedgerTypes.push_back( + aobjs[i]["LedgerEntryType"].asString()); } + std::sort(gotLedgerTypes.begin(), gotLedgerTypes.end()); BEAST_EXPECT(gotLedgerTypes == expectedLedgerTypes); } }