auto merge of #16475 : treeman/rust/complex-divide-by-zero-test, r=alexcrichton

Did not find a test for it.
This commit is contained in:
bors 2014-08-16 07:16:13 +00:00
commit bc181f8075
1 changed files with 8 additions and 0 deletions

View File

@ -257,6 +257,14 @@ mod test {
assert_eq!(_1_0i.inv(), _1_0i.inv()); 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] #[test]
#[should_fail] #[should_fail]
#[ignore] #[ignore]