1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
16using tracegen::TestTraceContainer;
21TEST(MovConstrainingTest, MovFF)
23 TestTraceContainer
trace({
24 { { C::precomputed_first_row, 1 } },
26 { C::execution_sel, 1 },
27 { C::execution_sel_execute_mov, 1 },
30 { C::execution_mem_tag_reg_0_,
static_cast<uint8_t
>(
MemoryTag::FF) },
31 { C::execution_mem_tag_reg_1_,
static_cast<uint8_t
>(
MemoryTag::FF) },
38class MovAnyTagTest :
public ::testing::TestWithParam<MemoryTag> {};
40TEST_P(MovAnyTagTest, MovAnyTag)
42 const auto tag = GetParam();
43 TestTraceContainer
trace({
44 { { C::precomputed_first_row, 1 } },
46 { C::execution_sel, 1 },
47 { C::execution_sel_execute_mov, 1 },
48 { C::execution_register_0_, 1 },
49 { C::execution_register_1_, 1 },
50 { C::execution_mem_tag_reg_0_,
static_cast<uint8_t
>(
tag) },
51 { C::execution_mem_tag_reg_1_,
static_cast<uint8_t
>(
tag) },
64TEST(MovConstrainingTest, NegativeMovDifferentTag)
66 TestTraceContainer
trace({
67 { { C::precomputed_first_row, 1 } },
69 { C::execution_sel, 1 },
70 { C::execution_sel_execute_mov, 1 },
71 { C::execution_register_0_, 17 },
72 { C::execution_register_1_, 17 },
73 { C::execution_mem_tag_reg_0_,
static_cast<uint8_t
>(
MemoryTag::U8) },
74 { C::execution_mem_tag_reg_1_,
static_cast<uint8_t
>(
MemoryTag::U16) },
81TEST(MovConstrainingTest, NegativeMovDifferentValue)
83 TestTraceContainer
trace({
84 { { C::precomputed_first_row, 1 } },
86 { C::execution_sel, 1 },
87 { C::execution_sel_execute_mov, 1 },
88 { C::execution_register_0_, 17 },
89 { C::execution_register_1_, 18 },
90 { C::execution_mem_tag_reg_0_,
static_cast<uint8_t
>(
MemoryTag::U32) },
91 { C::execution_mem_tag_reg_1_,
static_cast<uint8_t
>(
MemoryTag::U32) },
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessageRegex)
static constexpr size_t SR_MOV_SAME_TAG
static constexpr size_t SR_MOV_SAME_VALUE
INSTANTIATE_TEST_SUITE_P(PaddingVariants, AvmRecursiveTestsParameterized, ::testing::Values(false, true), [](const auto &info) { return info.param ? "Padded" :"Unpadded";})
TEST_P(AvmRecursiveTestsParameterized, GoblinRecursion)
A test of the Goblinized AVM recursive verifier.
TEST(AvmFixedVKTests, FixedVKCommitments)
Test that the fixed VK commitments agree with the ones computed from precomputed columns.
static constexpr uint256_t modulus_minus_two
NiceMock< MockExecution > execution