mirror of
https://github.com/arnaucube/circom-compat.git
synced 2026-01-09 07:21:33 +01:00
replace i32 by u32 (#19)
* replace i32 by u32 * fix overflow in usize * add testcase for u32 input
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user