replace i32 by u32 (#19)

* replace i32 by u32

* fix overflow in usize

* add testcase for u32 input
This commit is contained in:
Philipp Sippl
2022-02-17 08:23:19 -07:00
committed by GitHub
parent cac27e6536
commit e81fd92a67
3 changed files with 69 additions and 60 deletions

View File

@@ -90,3 +90,19 @@ fn groth16_proof_circom2() -> Result<()> {
Ok(())
}
#[test]
#[cfg(feature = "circom-2")]
fn witness_generation_circom2() -> Result<()> {
let cfg = CircomConfig::<Bn254>::new(
"./test-vectors/circom2_multiplier2.wasm",
"./test-vectors/circom2_multiplier2.r1cs",
)?;
let mut builder = CircomBuilder::new(cfg);
builder.push_input("a", 3);
builder.push_input("b", 0x100000000u64 - 1);
assert!(builder.build().is_ok());
Ok(())
}