Add a test for complex divide by zero.
This commit is contained in:
parent
9d554212de
commit
0f40cf1f59
1 changed files with 8 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue