Skip to content

Commit 78ad5fe

Browse files
authored
Move trace output earlier in state transition tests (#714)
1 parent 74d2143 commit 78ad5fe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/unittests/state_transition.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ void state_transition::TearDown()
6363
evmone::state::finalize(
6464
state, rev, block.coinbase, block_reward, block.ommers, block.withdrawals);
6565

66+
if (trace)
67+
{
68+
if (expect.trace.starts_with('\n')) // It's easier to define expected trace with \n.
69+
expect.trace.remove_prefix(1);
70+
EXPECT_EQ(trace_capture->get_capture(), expect.trace);
71+
}
72+
6673
EXPECT_EQ(receipt.status, expect.status);
6774
if (expect.gas_used.has_value())
6875
{
@@ -110,12 +117,5 @@ void state_transition::TearDown()
110117
{
111118
EXPECT_TRUE(expect.post.contains(addr)) << "unexpected account " << addr;
112119
}
113-
114-
if (trace)
115-
{
116-
if (expect.trace.starts_with('\n')) // It's easier to define expected trace with \n.
117-
expect.trace.remove_prefix(1);
118-
EXPECT_EQ(trace_capture->get_capture(), expect.trace);
119-
}
120120
}
121121
} // namespace evmone::test

0 commit comments

Comments
 (0)