diff --git a/test/unittests/evm_fixture.hpp b/test/unittests/evm_fixture.hpp index 7452c245d8..a5c6fc2cfb 100644 --- a/test/unittests/evm_fixture.hpp +++ b/test/unittests/evm_fixture.hpp @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once +#include "evmone/eof.hpp" #include #include #include @@ -79,6 +80,12 @@ class evm : public testing::TestWithParam host.access_account(msg.recipient); } + if (rev >= EVMC_CANCUN && is_eof_container(code)) + { + ASSERT_EQ(get_error_message(validate_eof(rev, code)), + get_error_message(EOFValidationError::success)); + } + result = vm.execute(host, rev, msg, code.data(), code.size()); output = {result.output_data, result.output_size}; gas_used = msg.gas - result.gas_left;