about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-16 07:16:13 +0000
committerbors <bors@rust-lang.org>2014-08-16 07:16:13 +0000
commitbc181f807523e4e14540a7031039e04a7d1be067 (patch)
tree49ca6484271001c7c79e76fbfb99c32f3926ab00 /src
parentec1d34eb276f8eedf026143d18c9416dc5836d50 (diff)
parent0f40cf1f5946dabf7652afa8ee7afb03d13af9bc (diff)
downloadrust-bc181f807523e4e14540a7031039e04a7d1be067.tar.gz
rust-bc181f807523e4e14540a7031039e04a7d1be067.zip
auto merge of #16475 : treeman/rust/complex-divide-by-zero-test, r=alexcrichton
Did not find a test for it.
Diffstat (limited to 'src')
-rw-r--r--src/libnum/complex.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libnum/complex.rs b/src/libnum/complex.rs
index f4a3ac97a4e..66412eb678f 100644
--- a/src/libnum/complex.rs
+++ b/src/libnum/complex.rs
@@ -259,6 +259,14 @@ mod test {
 
     #[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]
     fn test_inv_zero() {
         // FIXME #5736: should this really fail, or just NaN?