From e6649b2770b92ed708eb44d2b3a44eed8d689028 Mon Sep 17 00:00:00 2001 From: Andrei Maiboroda Date: Mon, 24 Apr 2023 12:57:18 +0200 Subject: [PATCH] Print which account failed post-state check in state transition tests --- test/unittests/state_transition.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/unittests/state_transition.cpp b/test/unittests/state_transition.cpp index 039144a713..710142427d 100644 --- a/test/unittests/state_transition.cpp +++ b/test/unittests/state_transition.cpp @@ -42,20 +42,21 @@ void state_transition::TearDown() ASSERT_NE(acc, nullptr) << "account " << addr << " should exist"; if (expected_acc.nonce.has_value()) { - EXPECT_EQ(acc->nonce, *expected_acc.nonce); + EXPECT_EQ(acc->nonce, *expected_acc.nonce) << "account " << addr; } if (expected_acc.balance.has_value()) { EXPECT_EQ(acc->balance, *expected_acc.balance) - << to_string(acc->balance) << " vs " << to_string(*expected_acc.balance); + << to_string(acc->balance) << " vs " << to_string(*expected_acc.balance) + << " account " << addr; } if (expected_acc.code.has_value()) { - EXPECT_EQ(acc->code, *expected_acc.code); + EXPECT_EQ(acc->code, *expected_acc.code) << "account " << addr; } for (const auto& [key, value] : expected_acc.storage) { - EXPECT_EQ(acc->storage[key].current, value); + EXPECT_EQ(acc->storage[key].current, value) << "account " << addr; } for (const auto& [key, value] : acc->storage) {