Skip to content

Commit

Permalink
auto merge of #16475 : treeman/rust/complex-divide-by-zero-test, r=al…
Browse files Browse the repository at this point in the history
…excrichton

Did not find a test for it.
  • Loading branch information
bors committed Aug 16, 2014
2 parents ec1d34e + 0f40cf1 commit bc181f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libnum/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ mod test {
assert_eq!(_1_0i.inv(), _1_0i.inv());
}

#[test]
#[should_fail]
fn test_divide_by_zero_natural() {
let n = Complex::new(2i, 3i);
let d = Complex::new(0, 0);
let _x = n / d;
}

#[test]
#[should_fail]
#[ignore]
Expand Down

0 comments on commit bc181f8

Please sign in to comment.