Replace #[should_fail] with #[should_panic]
This commit is contained in:
parent
2086b40893
commit
8ea4c031dd
|
@ -2300,7 +2300,7 @@ mod biguint_tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_sub_fail_on_underflow() {
|
fn test_sub_fail_on_underflow() {
|
||||||
let (a, b) : (BigUint, BigUint) = (Zero::zero(), One::one());
|
let (a, b) : (BigUint, BigUint) = (Zero::zero(), One::one());
|
||||||
a - b;
|
a - b;
|
||||||
|
@ -2686,14 +2686,14 @@ mod biguint_tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_zero_rand_range() {
|
fn test_zero_rand_range() {
|
||||||
thread_rng().gen_biguint_range(&FromPrimitive::from_usize(54).unwrap(),
|
thread_rng().gen_biguint_range(&FromPrimitive::from_usize(54).unwrap(),
|
||||||
&FromPrimitive::from_usize(54).unwrap());
|
&FromPrimitive::from_usize(54).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_negative_rand_range() {
|
fn test_negative_rand_range() {
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
let l = FromPrimitive::from_usize(2352).unwrap();
|
let l = FromPrimitive::from_usize(2352).unwrap();
|
||||||
|
@ -3351,14 +3351,14 @@ mod bigint_tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_zero_rand_range() {
|
fn test_zero_rand_range() {
|
||||||
thread_rng().gen_bigint_range(&FromPrimitive::from_isize(54).unwrap(),
|
thread_rng().gen_bigint_range(&FromPrimitive::from_isize(54).unwrap(),
|
||||||
&FromPrimitive::from_isize(54).unwrap());
|
&FromPrimitive::from_isize(54).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_negative_rand_range() {
|
fn test_negative_rand_range() {
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
let l = FromPrimitive::from_usize(2352).unwrap();
|
let l = FromPrimitive::from_usize(2352).unwrap();
|
||||||
|
|
|
@ -324,7 +324,7 @@ mod test {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_divide_by_zero_natural() {
|
fn test_divide_by_zero_natural() {
|
||||||
let n = Complex::new(2, 3);
|
let n = Complex::new(2, 3);
|
||||||
let d = Complex::new(0, 0);
|
let d = Complex::new(0, 0);
|
||||||
|
@ -332,7 +332,7 @@ mod test {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
#[ignore]
|
#[ignore]
|
||||||
fn test_inv_zero() {
|
fn test_inv_zero() {
|
||||||
// FIXME #5736: should this really fail, or just NaN?
|
// FIXME #5736: should this really fail, or just NaN?
|
||||||
|
|
|
@ -519,7 +519,7 @@ mod test {
|
||||||
assert_eq!(one22, One::one());
|
assert_eq!(one22, One::one());
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_new_zero() {
|
fn test_new_zero() {
|
||||||
let _a = Ratio::new(1,0);
|
let _a = Ratio::new(1,0);
|
||||||
}
|
}
|
||||||
|
@ -674,7 +674,7 @@ mod test {
|
||||||
assert_eq!(_0 - _0, _0);
|
assert_eq!(_0 - _0, _0);
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
#[should_fail]
|
#[should_panic]
|
||||||
fn test_div_0() {
|
fn test_div_0() {
|
||||||
let _a = _1 / _0;
|
let _a = _1 / _0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue