diff --git a/src/circuit/test/mod.rs b/src/circuit/test/mod.rs index 9728e04..12fe0ca 100644 --- a/src/circuit/test/mod.rs +++ b/src/circuit/test/mod.rs @@ -294,6 +294,20 @@ impl TestConstraintSystem { } } + pub fn verify(&self, expected: &[E::Fr]) -> bool + { + assert_eq!(expected.len() + 1, self.inputs.len()); + + for (a, b) in self.inputs.iter().skip(1).zip(expected.iter()) + { + if &a.0 != b { + return false + } + } + + return true; + } + pub fn num_inputs(&self) -> usize { self.inputs.len() }