Skip to content

Commit

Permalink
Minor test improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Oct 20, 2023
1 parent 198e7cd commit 1f26905
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/test/rpc/TransactionEntry_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,16 @@ class TransactionEntry_test : public beast::unit_test::suite
memberIt++)
{
auto const name = memberIt.memberName();
BEAST_EXPECT(resIndex[jss::tx_json].isMember(name));
auto const received = resIndex[jss::tx_json][name];
std::ostringstream ssReceived;
ssReceived << received;
std::ostringstream ssExpected;
ssExpected << *memberIt;
BEAST_EXPECTS(
received == *memberIt,
txhash + " contains \n\"" + name + "\": " //
+ ssReceived.str() //
+ "but expected " //
+ ssExpected.str());
if (BEAST_EXPECT(resIndex[jss::tx_json].isMember(name)))
{
auto const received = resIndex[jss::tx_json][name];
BEAST_EXPECTS(
received == *memberIt,
txhash + " contains \n\"" + name + "\": " //
+ to_string(received) //
+ " but expected " //
+ to_string(expected));
}
}
}

Expand Down

0 comments on commit 1f26905

Please sign in to comment.