Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mock_execution_components.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <memory>
5
#include <span>
6
7
#include <gmock/gmock.h>
8
9
#include "
barretenberg/vm2/common/memory_types.hpp
"
10
#include "
barretenberg/vm2/simulation/execution_components.hpp
"
11
12
namespace
bb::avm2::simulation
{
13
14
class
MockExecutionComponentsProvider
:
public
ExecutionComponentsProviderInterface
{
15
public
:
16
// https://google.github.io/googletest/gmock_cook_book.html#making-the-compilation-faster
17
MockExecutionComponentsProvider
();
18
~MockExecutionComponentsProvider
()
override
;
19
20
MOCK_METHOD
(
std::unique_ptr<AddressingInterface>
,
make_addressing
, (
AddressingEvent
&
event
), (
override
));
21
MOCK_METHOD
(
std::unique_ptr<GasTrackerInterface>
,
22
make_gas_tracker
,
23
(
GasEvent
&
gas_event
,
const
Instruction
&
instruction
,
ContextInterface
&
context
),
24
(
override
));
25
};
26
27
}
// namespace bb::avm2::simulation
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ContextInterface
Definition
context.hpp:23
bb::avm2::simulation::ExecutionComponentsProviderInterface
Definition
execution_components.hpp:21
bb::avm2::simulation::ExecutionComponentsProviderInterface::make_gas_tracker
virtual std::unique_ptr< GasTrackerInterface > make_gas_tracker(GasEvent &gas_event, const Instruction &instruction, ContextInterface &context)=0
bb::avm2::simulation::ExecutionComponentsProviderInterface::make_addressing
virtual std::unique_ptr< AddressingInterface > make_addressing(AddressingEvent &event)=0
bb::avm2::simulation::MockExecutionComponentsProvider
Definition
mock_execution_components.hpp:14
bb::avm2::simulation::MockExecutionComponentsProvider::MockExecutionComponentsProvider
MockExecutionComponentsProvider()
bb::avm2::simulation::MockExecutionComponentsProvider::MOCK_METHOD
MOCK_METHOD(std::unique_ptr< AddressingInterface >, make_addressing,(AddressingEvent &event),(override))
bb::avm2::simulation::MockExecutionComponentsProvider::MOCK_METHOD
MOCK_METHOD(std::unique_ptr< GasTrackerInterface >, make_gas_tracker,(GasEvent &gas_event, const Instruction &instruction, ContextInterface &context),(override))
bb::avm2::simulation::MockExecutionComponentsProvider::~MockExecutionComponentsProvider
~MockExecutionComponentsProvider() override
execution_components.hpp
gas_event
GasEvent gas_event
Definition
gas_tracker.test.cpp:33
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:32
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation.cpp:8
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
event
simulation::PublicDataTreeReadWriteEvent event
Definition
public_data_tree_trace.cpp:20
bb::avm2::simulation::AddressingEvent
Definition
addressing_event.hpp:52
bb::avm2::simulation::GasEvent
Definition
gas_event.hpp:22
bb::avm2::simulation::Instruction
Definition
serialization.hpp:30
src
barretenberg
vm2
simulation
testing
mock_execution_components.hpp
Generated by
1.9.8