Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
range_check.test.cpp
Go to the documentation of this file.
1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
3
6
7namespace bb::avm2::simulation {
8namespace {
9
10using testing::ElementsAre;
11
12TEST(RangeCheckSimulationTest, AssertRange)
13{
14 EventEmitter<RangeCheckEvent> emitter;
15 RangeCheck range_check(emitter);
16
17 uint128_t value = 333;
18 uint8_t num_bits = 100;
20
21 RangeCheckEvent expect_event = {
22 .value = value,
23 .num_bits = num_bits,
24 };
25
26 EXPECT_THAT(emitter.dump_events(), ElementsAre(expect_event));
27}
28
29} // namespace
30} // namespace bb::avm2::simulation
void assert_range(uint128_t value, uint8_t num_bits) override
RangeCheck range_check
TEST(EmitUnencryptedLogTest, Basic)
unsigned __int128 uint128_t
Definition serialize.hpp:44