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/events/addressing_event.hpp
"
11
#include "
barretenberg/vm2/simulation/interfaces/addressing.hpp
"
12
#include "
barretenberg/vm2/simulation/interfaces/execution_components.hpp
"
13
#include "
barretenberg/vm2/simulation/interfaces/gas_tracker.hpp
"
14
15
namespace
bb::avm2::simulation
{
16
17
class
MockExecutionComponentsProvider
:
public
ExecutionComponentsProviderInterface
{
18
public
:
19
// https://google.github.io/googletest/gmock_cook_book.html#making-the-compilation-faster
20
MockExecutionComponentsProvider
();
21
~MockExecutionComponentsProvider
()
override
;
22
23
MOCK_METHOD
(
std::unique_ptr<AddressingInterface>
,
make_addressing
, (
AddressingEvent
&
event
), (
override
));
24
MOCK_METHOD
(
std::unique_ptr<GasTrackerInterface>
,
25
make_gas_tracker
,
26
(
GasEvent
&
gas_event
,
const
Instruction
&
instruction
,
ContextInterface
&
context
),
27
(
override
));
28
};
29
30
}
// namespace bb::avm2::simulation
addressing_event.hpp
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ContextInterface
Definition
context.hpp:20
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:17
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
gas_event
GasEvent gas_event
Definition
gas_tracker.test.cpp:34
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:33
execution_components.hpp
gas_tracker.hpp
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
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:24
addressing.hpp
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:32
src
barretenberg
vm2
simulation
testing
mock_execution_components.hpp
Generated by
1.9.8