|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/circuit_checker/circuit_checker.hpp"#include "barretenberg/numeric/uint256/uint256.hpp"#include "failure_test_utils.hpp"#include "ultra_honk.test.hpp"Go to the source code of this file.
Typedefs | |
| using | FlavorTypes = testing::Types< UltraFlavor, UltraZKFlavor, UltraKeccakFlavor, UltraKeccakZKFlavor, UltraRollupFlavor > |
| template<typename T > | |
| using | RangeTests = UltraHonkTests< T > |
Functions | |
| TYPED_TEST_SUITE (RangeTests, FlavorTypes) | |
| TYPED_TEST (RangeTests, EnforceSmallDeltasBasic) | |
| TYPED_TEST (RangeTests, EnforceSmallDeltasWithDuplicatesAndMaxDelta) | |
| TYPED_TEST (RangeTests, EnforceSmallDeltasFailsDeltaTooLarge) | |
| TYPED_TEST (RangeTests, EnforceSmallDeltasFailsNotSorted) | |
| TYPED_TEST (RangeTests, SortConstraintWithEdgesBasic) | |
| TYPED_TEST (RangeTests, SortConstraintWithEdgesComplex) | |
| TYPED_TEST (RangeTests, SortConstraintWithEdgesFailsWrongEnd) | |
| TYPED_TEST (RangeTests, SortConstraintWithEdgesFailsWrongStart) | |
| TYPED_TEST (RangeTests, SortConstraintWithEdgesFailsDeltaTooLarge) | |
| TYPED_TEST (RangeTests, SmallRangeConstraintBasic) | |
| TYPED_TEST (RangeTests, SmallRangeConstraintAtBoundary) | |
| TYPED_TEST (RangeTests, SmallRangeConstraintMultipleValues) | |
| TYPED_TEST (RangeTests, SmallRangeConstraintFailsValueTooLarge) | |
| TYPED_TEST (RangeTests, SmallRangeConstraintFailsValueJustOverBoundary) | |
| TYPED_TEST (RangeTests, SmallRangeConstraintFailsOrphanVariable) | |
| TYPED_TEST (RangeTests, RangeConstraintWithArithmeticGates) | |
| TYPED_TEST (RangeTests, RangeConstraintNonPowerOfTwo) | |
| TYPED_TEST (RangeTests, MultipleRangeConstraintsOnSmallWitness) | |
| Test that multiple range constraints on the same small witness all pass. | |
| TYPED_TEST (RangeTests, LimbedRangeConstraint14Bits) | |
| TYPED_TEST (RangeTests, LimbedRangeConstraint133Bits) | |
| TYPED_TEST (RangeTests, LimbedRangeConstraint253Bits) | |
| TYPED_TEST (RangeTests, DyadicRangeConstraintOnOrphanVariable) | |
| Test that a range constraint on an "orphan" variable (not used in any other gate) works. | |
| TYPED_TEST (RangeTests, RangeConstraintsOnDuplicateVariables) | |
| Test range constraints on variables linked by assert_equal. | |
| using FlavorTypes = testing::Types<UltraFlavor, UltraZKFlavor, UltraKeccakFlavor, UltraKeccakZKFlavor, UltraRollupFlavor> |
Definition at line 17 of file range_constraint.test.cpp.
| using RangeTests = UltraHonkTests<T> |
Definition at line 20 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| DyadicRangeConstraintOnOrphanVariable | |||
| ) |
Test that a range constraint on an "orphan" variable (not used in any other gate) works.
The create_dyadic_range_constraint function adds a dummy arithmetic gate to ensure the variable appears in a wire, which is required for the generalized permutation argument to work.
Definition at line 354 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| EnforceSmallDeltasBasic | |||
| ) |
Definition at line 29 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| EnforceSmallDeltasFailsDeltaTooLarge | |||
| ) |
Definition at line 53 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| EnforceSmallDeltasFailsNotSorted | |||
| ) |
Definition at line 64 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| EnforceSmallDeltasWithDuplicatesAndMaxDelta | |||
| ) |
Definition at line 40 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| LimbedRangeConstraint133Bits | |||
| ) |
Definition at line 310 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| LimbedRangeConstraint14Bits | |||
| ) |
Definition at line 293 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| LimbedRangeConstraint253Bits | |||
| ) |
Definition at line 328 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| MultipleRangeConstraintsOnSmallWitness | |||
| ) |
Test that multiple range constraints on the same small witness all pass.
Definition at line 269 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| RangeConstraintNonPowerOfTwo | |||
| ) |
Definition at line 249 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| RangeConstraintsOnDuplicateVariables | |||
| ) |
Test range constraints on variables linked by assert_equal.
Multiple variables with the same value are linked via assert_equal, then each is given a different range constraint. The tightest constraint (999) should apply to all.
Definition at line 376 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| RangeConstraintWithArithmeticGates | |||
| ) |
Definition at line 230 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SmallRangeConstraintAtBoundary | |||
| ) |
Definition at line 157 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SmallRangeConstraintBasic | |||
| ) |
Definition at line 143 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SmallRangeConstraintFailsOrphanVariable | |||
| ) |
Definition at line 213 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SmallRangeConstraintFailsValueJustOverBoundary | |||
| ) |
Definition at line 198 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SmallRangeConstraintFailsValueTooLarge | |||
| ) |
Definition at line 184 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SmallRangeConstraintMultipleValues | |||
| ) |
Definition at line 169 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SortConstraintWithEdgesBasic | |||
| ) |
Definition at line 82 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SortConstraintWithEdgesComplex | |||
| ) |
Definition at line 93 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SortConstraintWithEdgesFailsDeltaTooLarge | |||
| ) |
Definition at line 127 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SortConstraintWithEdgesFailsWrongEnd | |||
| ) |
Definition at line 105 of file range_constraint.test.cpp.
| TYPED_TEST | ( | RangeTests | , |
| SortConstraintWithEdgesFailsWrongStart | |||
| ) |
Definition at line 116 of file range_constraint.test.cpp.
| TYPED_TEST_SUITE | ( | RangeTests | , |
| FlavorTypes | |||
| ) |