Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
BoolTest< Builder_ > Class Template Reference
Inheritance diagram for BoolTest< Builder_ >:

Classes

struct  BoolInput
 

Public Types

using Builder = Builder_
 
using witness_ct = stdlib::witness_t< Builder >
 
using bool_ct = stdlib::bool_t< Builder >
 

Public Member Functions

void test_binary_op (std::string const &op_name, const std::function< bool_ct(const bool_ct &, const bool_ct &)> &op, const std::function< bool(bool, bool)> &expected_op)
 
void test_construct_from_const_bool ()
 
void test_construct_from_witness ()
 
void test_AND ()
 
void test_xor ()
 
void test_OR ()
 
void test_EQ ()
 
void test_NEQ ()
 
void test_implies ()
 
void test_implies_both_ways ()
 
void test_must_imply ()
 
void test_conditional_assign ()
 
void test_normalize ()
 
void test_assert_equal ()
 
void test_basic_operations_tags ()
 
void test_simple_proof ()
 

Static Public Member Functions

static bool_ct create_bool_ct (const BoolInput &in, Builder *builder)
 

Public Attributes

std::array< BoolInput, 8 > all_inputs
 

Detailed Description

template<class Builder_>
class BoolTest< Builder_ >

Definition at line 17 of file bool.test.cpp.

Member Typedef Documentation

◆ bool_ct

template<class Builder_ >
using BoolTest< Builder_ >::bool_ct = stdlib::bool_t<Builder>

Definition at line 21 of file bool.test.cpp.

◆ Builder

template<class Builder_ >
using BoolTest< Builder_ >::Builder = Builder_

Definition at line 19 of file bool.test.cpp.

◆ witness_ct

template<class Builder_ >
using BoolTest< Builder_ >::witness_ct = stdlib::witness_t<Builder>

Definition at line 20 of file bool.test.cpp.

Member Function Documentation

◆ create_bool_ct()

template<class Builder_ >
static bool_ct BoolTest< Builder_ >::create_bool_ct ( const BoolInput in,
Builder builder 
)
inlinestatic

Definition at line 44 of file bool.test.cpp.

◆ test_AND()

template<class Builder_ >
void BoolTest< Builder_ >::test_AND ( )
inline

Definition at line 134 of file bool.test.cpp.

◆ test_assert_equal()

template<class Builder_ >
void BoolTest< Builder_ >::test_assert_equal ( )
inline

Definition at line 295 of file bool.test.cpp.

◆ test_basic_operations_tags()

template<class Builder_ >
void BoolTest< Builder_ >::test_basic_operations_tags ( )
inline

Definition at line 324 of file bool.test.cpp.

◆ test_binary_op()

template<class Builder_ >
void BoolTest< Builder_ >::test_binary_op ( std::string const &  op_name,
const std::function< bool_ct(const bool_ct &, const bool_ct &)> &  op,
const std::function< bool(bool, bool)> &  expected_op 
)
inline

Definition at line 50 of file bool.test.cpp.

◆ test_conditional_assign()

template<class Builder_ >
void BoolTest< Builder_ >::test_conditional_assign ( )
inline

Definition at line 234 of file bool.test.cpp.

◆ test_construct_from_const_bool()

template<class Builder_ >
void BoolTest< Builder_ >::test_construct_from_const_bool ( )
inline

Definition at line 96 of file bool.test.cpp.

◆ test_construct_from_witness()

template<class Builder_ >
void BoolTest< Builder_ >::test_construct_from_witness ( )
inline

Definition at line 110 of file bool.test.cpp.

◆ test_EQ()

template<class Builder_ >
void BoolTest< Builder_ >::test_EQ ( )
inline

Definition at line 152 of file bool.test.cpp.

◆ test_implies()

template<class Builder_ >
void BoolTest< Builder_ >::test_implies ( )
inline

Definition at line 164 of file bool.test.cpp.

◆ test_implies_both_ways()

template<class Builder_ >
void BoolTest< Builder_ >::test_implies_both_ways ( )
inline

Definition at line 172 of file bool.test.cpp.

◆ test_must_imply()

template<class Builder_ >
void BoolTest< Builder_ >::test_must_imply ( )
inline

Definition at line 180 of file bool.test.cpp.

◆ test_NEQ()

template<class Builder_ >
void BoolTest< Builder_ >::test_NEQ ( )
inline

Definition at line 158 of file bool.test.cpp.

◆ test_normalize()

template<class Builder_ >
void BoolTest< Builder_ >::test_normalize ( )
inline

Definition at line 270 of file bool.test.cpp.

◆ test_OR()

template<class Builder_ >
void BoolTest< Builder_ >::test_OR ( )
inline

Definition at line 146 of file bool.test.cpp.

◆ test_simple_proof()

template<class Builder_ >
void BoolTest< Builder_ >::test_simple_proof ( )
inline

Definition at line 384 of file bool.test.cpp.

◆ test_xor()

template<class Builder_ >
void BoolTest< Builder_ >::test_xor ( )
inline

Definition at line 140 of file bool.test.cpp.

Member Data Documentation

◆ all_inputs

template<class Builder_ >
std::array<BoolInput, 8> BoolTest< Builder_ >::all_inputs
Initial value:
= []() {
size_t idx = 0;
for (bool is_const : { false, true }) {
for (bool value : { false, true }) {
for (bool is_inverted : { false, true }) {
inputs[idx++] = BoolInput{ is_const, value, is_inverted };
}
}
}
return inputs;
}()
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13

Definition at line 31 of file bool.test.cpp.


The documentation for this class was generated from the following file: