eval_fns for PublicInputGate (#177)

And a small fix in eval_fns
This commit is contained in:
Daniel Lubarov 2021-08-14 08:48:02 -07:00 committed by GitHub
parent 9c42fef997
commit 8effaf76e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -137,9 +137,7 @@ pub(crate) fn test_eval_fns<F: Extendable<D>, G: Gate<F, D>, const D: usize>(
let vars = EvaluationVars {
local_constants: &constants,
local_wires: &wires,
public_inputs_hash: &HashOut {
elements: [F::ZERO; 4],
},
public_inputs_hash: &public_inputs_hash,
};
let evals = gate.eval_unfiltered(vars);

View File

@ -56,7 +56,6 @@ impl<F: Extendable<D>, const D: usize> Gate<F, D> for NoopGate {
#[cfg(test)]
mod tests {
use crate::field::crandall_field::CrandallField;
use crate::gates::gate_testing::{test_eval_fns, test_low_degree};
use crate::gates::noop::NoopGate;

View File

@ -77,11 +77,16 @@ impl<F: Extendable<D>, const D: usize> Gate<F, D> for PublicInputGate {
#[cfg(test)]
mod tests {
use crate::field::crandall_field::CrandallField;
use crate::gates::gate_testing::test_low_degree;
use crate::gates::gate_testing::{test_eval_fns, test_low_degree};
use crate::gates::public_input::PublicInputGate;
#[test]
fn low_degree() {
test_low_degree::<CrandallField, _, 4>(PublicInputGate)
}
#[test]
fn eval_fns() -> anyhow::Result<()> {
test_eval_fns::<CrandallField, _, 4>(PublicInputGate)
}
}