Fix handling of Lt, LtEq (#393)
Changed the middleware to only allow comparison of integers and to use the implementation of Ord for i64. This matches the backend behavior. Also fixed a separate bug where LtEqFromEntries was producing a NotEquals statement.
This commit is contained in:
parent
1508dd6126
commit
f76197c602
6 changed files with 36 additions and 27 deletions
|
|
@ -1095,4 +1095,14 @@ pub mod tests {
|
|||
let std_common = &*cache_get_standard_rec_main_pod_common_circuit_data();
|
||||
assert_eq!(std_common.0, main_common.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_negative_less_than_zero() -> frontend::Result<()> {
|
||||
let params = Params::default();
|
||||
let mut builder = MainPodBuilder::new(¶ms, &DEFAULT_VD_SET);
|
||||
builder.pub_op(frontend::Operation::lt(-1, 0))?;
|
||||
let prover = Prover {};
|
||||
builder.prove(&prover)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue