Skip to content

Commit 7106dc8

Browse files
authored
constraint tests correctly check is_satisfied (#370)
1 parent 2fa558f commit 7106dc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

relations/src/r1cs/constraint_system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ mod tests {
10711071
cs.enforce_constraint(lc!() + Variable::One, lc!() + e, lc!() + e)?;
10721072

10731073
cs.finalize();
1074-
assert!(cs.is_satisfied().is_ok());
1074+
assert!(cs.is_satisfied().unwrap());
10751075
let matrices = cs.to_matrices().unwrap();
10761076
assert_eq!(matrices.a[0], vec![(Fr::one(), 1)]);
10771077
assert_eq!(matrices.b[0], vec![(two, 2)]);
@@ -1129,7 +1129,7 @@ mod tests {
11291129
)?;
11301130

11311131
cs.finalize();
1132-
assert!(cs.is_satisfied().is_ok());
1132+
assert!(cs.is_satisfied().unwrap());
11331133
let matrices = cs.to_matrices().unwrap();
11341134
// There are four gates(constraints), each generating a row.
11351135
// Resulting matrices:

0 commit comments

Comments
 (0)