diff options
| author | bors <bors@rust-lang.org> | 2014-08-16 07:16:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-16 07:16:13 +0000 |
| commit | bc181f807523e4e14540a7031039e04a7d1be067 (patch) | |
| tree | 49ca6484271001c7c79e76fbfb99c32f3926ab00 /src | |
| parent | ec1d34eb276f8eedf026143d18c9416dc5836d50 (diff) | |
| parent | 0f40cf1f5946dabf7652afa8ee7afb03d13af9bc (diff) | |
| download | rust-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.rs | 8 |
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? |
