From 8ea4c031dd99b3bc65e22a2a7046a10101548e97 Mon Sep 17 00:00:00 2001 From: Darin Morrison Date: Tue, 17 Mar 2015 22:21:25 -0600 Subject: [PATCH] Replace #[should_fail] with #[should_panic] --- src/bigint.rs | 10 +++++----- src/complex.rs | 4 ++-- src/rational.rs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bigint.rs b/src/bigint.rs index 7f92a57..366cbaa 100644 --- a/src/bigint.rs +++ b/src/bigint.rs @@ -2300,7 +2300,7 @@ mod biguint_tests { } #[test] - #[should_fail] + #[should_panic] fn test_sub_fail_on_underflow() { let (a, b) : (BigUint, BigUint) = (Zero::zero(), One::one()); a - b; @@ -2686,14 +2686,14 @@ mod biguint_tests { } #[test] - #[should_fail] + #[should_panic] fn test_zero_rand_range() { thread_rng().gen_biguint_range(&FromPrimitive::from_usize(54).unwrap(), &FromPrimitive::from_usize(54).unwrap()); } #[test] - #[should_fail] + #[should_panic] fn test_negative_rand_range() { let mut rng = thread_rng(); let l = FromPrimitive::from_usize(2352).unwrap(); @@ -3351,14 +3351,14 @@ mod bigint_tests { } #[test] - #[should_fail] + #[should_panic] fn test_zero_rand_range() { thread_rng().gen_bigint_range(&FromPrimitive::from_isize(54).unwrap(), &FromPrimitive::from_isize(54).unwrap()); } #[test] - #[should_fail] + #[should_panic] fn test_negative_rand_range() { let mut rng = thread_rng(); let l = FromPrimitive::from_usize(2352).unwrap(); diff --git a/src/complex.rs b/src/complex.rs index ee0c6cd..9b23952 100644 --- a/src/complex.rs +++ b/src/complex.rs @@ -324,7 +324,7 @@ mod test { } #[test] - #[should_fail] + #[should_panic] fn test_divide_by_zero_natural() { let n = Complex::new(2, 3); let d = Complex::new(0, 0); @@ -332,7 +332,7 @@ mod test { } #[test] - #[should_fail] + #[should_panic] #[ignore] fn test_inv_zero() { // FIXME #5736: should this really fail, or just NaN? diff --git a/src/rational.rs b/src/rational.rs index 9dcbaca..85f1484 100644 --- a/src/rational.rs +++ b/src/rational.rs @@ -519,7 +519,7 @@ mod test { assert_eq!(one22, One::one()); } #[test] - #[should_fail] + #[should_panic] fn test_new_zero() { let _a = Ratio::new(1,0); } @@ -674,7 +674,7 @@ mod test { assert_eq!(_0 - _0, _0); } #[test] - #[should_fail] + #[should_panic] fn test_div_0() { let _a = _1 / _0; }