Module pbt

Source
Expand description

This module contains a list of property tests for the MVPoly trait.

Any type that implements the MVPoly trait should pass these tests.

For instance, one can call the test_mul_by_one as follows:

use mvpoly::MVPoly;
use mvpoly::prime::Dense;
use mina_curves::pasta::Fp;

fn test_mul_by_one() {
    mvpoly::pbt::test_mul_by_one::<Fp, 2, 2, Dense<Fp, 2, 2>>();
    mvpoly::pbt::test_mul_by_one::<Fp, 4, 2, Dense<Fp, 4, 2>>();
}

Functionsยง

test_add_monomial
test_add_zero
test_can_be_printed_with_debug
test_degree_constant
test_degree_random_degree
test_double_is_add_twice
test_eval_pbt_add
test_eval_pbt_mul_by_scalar
test_eval_pbt_neg
test_eval_pbt_sub
test_evaluation_constant_polynomial
test_evaluation_zero_polynomial
test_homogeneous_eval
test_is_constant
test_is_multilinear
test_is_zero
test_mul_by_one
test_mul_by_scalar
test_mul_by_scalar_with_one
test_mul_by_scalar_with_zero
test_mul_by_zero
test_mvpoly_add_degree_pbt
test_mvpoly_mul_by_scalar_degree_pbt
test_mvpoly_mul_degree_pbt
test_mvpoly_mul_eval_pbt
test_mvpoly_mul_pbt
test_mvpoly_neg_degree_pbt
test_mvpoly_sub_degree_pbt
test_neg
test_neg_ref
test_sub_zero