Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Run the test for zero division with mul div up #2206

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions yarn-project/noir-libs/safe-math/src/safe_u120.nr
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,10 @@ fn test_mul_div_up_ghost_overflow() {
// It should not be possible for us to overflow `mul_div_up` through the adder, since that require the divisor to be 1
// since we otherwise would not be at the max value. If divisor is 1, adder is 0.

// See https://github.com/AztecProtocol/aztec-packages/issues/2000
//#[test(should_fail)]
//fn test_mul_div_up_zero_divisor() {
// let a = SafeU120::new(6);
// let b = SafeU120::new(3);
// let c = SafeU120::new(0);
// let _d = SafeU120::mul_div_up(a, b, c);
//}
#[test(should_fail)]
fn test_mul_div_up_zero_divisor() {
let a = SafeU120::new(6);
let b = SafeU120::new(3);
let c = SafeU120::new(0);
let _d = SafeU120::mul_div_up(a, b, c);
}