Skip to content

Commit

Permalink
add main function
Browse files Browse the repository at this point in the history
  • Loading branch information
YaoGalteland committed Dec 19, 2023
1 parent 45bf11a commit e552574
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions halo2_proofs/examples/simple-example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ impl<F: Field> Circuit<F> for MyCircuit<F> {
// ANCHOR_END: circuit



use halo2_proofs::plonk::Error as VerifyFailure;

// ANCHOR: test-circuit
fn test_circuit(enforce_boolean: bool, correct_public_boolean: bool) -> Result<(), Vec<halo2_proofs::dev::VerifyFailure>> {
use halo2_proofs::{dev::MockProver, pasta::Fp};
Expand Down Expand Up @@ -369,6 +366,9 @@ fn test_circuit(enforce_boolean: bool, correct_public_boolean: bool) -> Result<(
prover.verify()
}

fn main() {
assert!(test_circuit(true, true).is_ok());
}
#[cfg(test)]
mod tests {
use crate::test_circuit;
Expand Down

0 comments on commit e552574

Please sign in to comment.