avoid division overflow in idivmod test

This commit is contained in:
Jorge Aparicio 2016-09-17 21:10:41 -05:00
parent 08c9ff730c
commit 225d4c9d45
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ mod tests {
fn idivmod(n: U32, d: U32) -> TestResult {
let (n, d) = (n.0 as i32, d.0 as i32);
if d == 0 {
if d == 0 || (n == i32::min_value() && d == -1) {
TestResult::discard()
} else {
let q: i32;