Skip to content

Commit bc181f8

Browse files
committed
auto merge of #16475 : treeman/rust/complex-divide-by-zero-test, r=alexcrichton
Did not find a test for it.
2 parents ec1d34e + 0f40cf1 commit bc181f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libnum/complex.rs

+8
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,14 @@ mod test {
257257
assert_eq!(_1_0i.inv(), _1_0i.inv());
258258
}
259259

260+
#[test]
261+
#[should_fail]
262+
fn test_divide_by_zero_natural() {
263+
let n = Complex::new(2i, 3i);
264+
let d = Complex::new(0, 0);
265+
let _x = n / d;
266+
}
267+
260268
#[test]
261269
#[should_fail]
262270
#[ignore]

0 commit comments

Comments
 (0)