Remove a bunch of emscripten test ignores
They are either outdated as emscripten now supports i128 or they are subsumed by #[cfg_attr(not(panic = "unwind"), ignore]
This commit is contained in:
parent
d0a70d9328
commit
88ff147c56
11 changed files with 29 additions and 59 deletions
|
|
@ -502,9 +502,7 @@ fn test_retain_catch_unwind() {
|
|||
// even if the order might not be correct.
|
||||
//
|
||||
// Destructors must be called exactly once per element.
|
||||
// FIXME: re-enable emscripten once it can unwind again
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn panic_safe() {
|
||||
use std::cmp;
|
||||
|
|
|
|||
|
|
@ -93,9 +93,6 @@ fn test_rng() -> rand_xorshift::XorShiftRng {
|
|||
rand::SeedableRng::from_seed(seed)
|
||||
}
|
||||
|
||||
// FIXME: Instantiated functions with i128 in the signature is not supported in Emscripten.
|
||||
// See https://github.com/kripken/emscripten-fastcomp/issues/169
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[test]
|
||||
fn test_boxed_hasher() {
|
||||
let ordinary_hash = hash(&5u32);
|
||||
|
|
|
|||
|
|
@ -1414,7 +1414,6 @@ fn test_box_slice_clone() {
|
|||
|
||||
#[test]
|
||||
#[allow(unused_must_use)] // here, we care about the side effects of `.clone()`
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn test_box_slice_clone_panics() {
|
||||
use std::sync::Arc;
|
||||
|
|
|
|||
|
|
@ -1587,9 +1587,7 @@ fn extract_if_complex() {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: re-enable emscripten once it can unwind again
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn extract_if_consumed_panic() {
|
||||
use std::rc::Rc;
|
||||
|
|
@ -1640,9 +1638,7 @@ fn extract_if_consumed_panic() {
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn extract_if_unconsumed_panic() {
|
||||
use std::rc::Rc;
|
||||
|
|
|
|||
|
|
@ -141,9 +141,6 @@ fn test_custom_state() {
|
|||
// const { assert!(hash(&Custom { hash: 6 }) == 6) };
|
||||
}
|
||||
|
||||
// FIXME: Instantiated functions with i128 in the signature is not supported in Emscripten.
|
||||
// See https://github.com/kripken/emscripten-fastcomp/issues/169
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[test]
|
||||
fn test_indirect_hasher() {
|
||||
let mut hasher = MyHasher { hash: 0 };
|
||||
|
|
|
|||
|
|
@ -84,9 +84,6 @@ where
|
|||
F: for<'a> FnMut(&Decoded, &'a mut [MaybeUninit<u8>]) -> Option<(&'a [u8], i16)>,
|
||||
G: for<'a> FnMut(&Decoded, &'a mut [MaybeUninit<u8>]) -> (&'a [u8], i16),
|
||||
{
|
||||
if cfg!(target_os = "emscripten") {
|
||||
return; // using rng pulls in i128 support, which doesn't work
|
||||
}
|
||||
let mut rng = crate::test_rng();
|
||||
let f32_range = Uniform::new(0x0000_0001u32, 0x7f80_0000);
|
||||
iterate("f32_random_equivalence_test", k, n, f, g, |_| {
|
||||
|
|
@ -100,9 +97,6 @@ where
|
|||
F: for<'a> FnMut(&Decoded, &'a mut [MaybeUninit<u8>]) -> Option<(&'a [u8], i16)>,
|
||||
G: for<'a> FnMut(&Decoded, &'a mut [MaybeUninit<u8>]) -> (&'a [u8], i16),
|
||||
{
|
||||
if cfg!(target_os = "emscripten") {
|
||||
return; // using rng pulls in i128 support, which doesn't work
|
||||
}
|
||||
let mut rng = crate::test_rng();
|
||||
let f64_range = Uniform::new(0x0000_0000_0000_0001u64, 0x7ff0_0000_0000_0000);
|
||||
iterate("f64_random_equivalence_test", k, n, f, g, |_| {
|
||||
|
|
|
|||
|
|
@ -51,9 +51,7 @@ macro_rules! test_op {
|
|||
};
|
||||
}
|
||||
|
||||
test_op!(test_neg_defined, Neg::neg(0), 0, i8, i16, i32, i64, f32, f64);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
test_op!(test_neg_defined_128, Neg::neg(0), 0, i128);
|
||||
test_op!(test_neg_defined, Neg::neg(0), 0, i8, i16, i32, i64, i128, f32, f64);
|
||||
|
||||
test_op!(test_not_defined_bool, Not::not(true), false, bool);
|
||||
|
||||
|
|
@ -69,17 +67,17 @@ macro_rules! test_arith_op {
|
|||
i16,
|
||||
i32,
|
||||
i64,
|
||||
i128,
|
||||
isize,
|
||||
u8,
|
||||
u16,
|
||||
u32,
|
||||
u64,
|
||||
u128,
|
||||
usize,
|
||||
f32,
|
||||
f64
|
||||
);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
impls_defined!($op, $method($lhs, $rhs), 0, i128, u128);
|
||||
}
|
||||
};
|
||||
($fn_name:ident, $op:ident::$method:ident(&mut $lhs:literal, $rhs:literal)) => {
|
||||
|
|
@ -93,17 +91,17 @@ macro_rules! test_arith_op {
|
|||
i16,
|
||||
i32,
|
||||
i64,
|
||||
i128,
|
||||
isize,
|
||||
u8,
|
||||
u16,
|
||||
u32,
|
||||
u64,
|
||||
u128,
|
||||
usize,
|
||||
f32,
|
||||
f64
|
||||
);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
impls_defined!($op, $method(&mut $lhs, $rhs), 0, i128, u128);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -131,15 +129,15 @@ macro_rules! test_bitop {
|
|||
i16,
|
||||
i32,
|
||||
i64,
|
||||
i128,
|
||||
isize,
|
||||
u8,
|
||||
u16,
|
||||
u32,
|
||||
u64,
|
||||
u128,
|
||||
usize
|
||||
);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
impls_defined!($op, $method(0, 0), 0, i128, u128);
|
||||
impls_defined!($op, $method(false, false), false, bool);
|
||||
}
|
||||
};
|
||||
|
|
@ -156,15 +154,15 @@ macro_rules! test_bitop_assign {
|
|||
i16,
|
||||
i32,
|
||||
i64,
|
||||
i128,
|
||||
isize,
|
||||
u8,
|
||||
u16,
|
||||
u32,
|
||||
u64,
|
||||
u128,
|
||||
usize
|
||||
);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
impls_defined!($op, $method(&mut 0, 0), 0, i128, u128);
|
||||
impls_defined!($op, $method(&mut false, false), false, bool);
|
||||
}
|
||||
};
|
||||
|
|
@ -182,9 +180,11 @@ macro_rules! test_shift_inner {
|
|||
$(impl_defined!($op, $method(0,0), 0, $lt, $rt);)+
|
||||
};
|
||||
($op:ident::$method:ident, $lt:ty) => {
|
||||
test_shift_inner!($op::$method, $lt, i8, i16, i32, i64, isize, u8, u16, u32, u64, usize);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
test_shift_inner!($op::$method, $lt, i128, u128);
|
||||
test_shift_inner!(
|
||||
$op::$method, $lt,
|
||||
i8, i16, i32, i64, i128, isize,
|
||||
u8, u16, u32, u64, u128, usize
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -195,9 +195,11 @@ macro_rules! test_shift {
|
|||
($test_name:ident, $op:ident::$method:ident) => {
|
||||
#[test]
|
||||
fn $test_name() {
|
||||
test_shift!($op::$method, i8, i16, i32, i64, isize, u8, u16, u32, u64, usize);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
test_shift!($op::$method, i128, u128);
|
||||
test_shift!(
|
||||
$op::$method,
|
||||
i8, i16, i32, i64, i128, isize,
|
||||
u8, u16, u32, u64, u128, usize
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -207,9 +209,11 @@ macro_rules! test_shift_assign_inner {
|
|||
$(impl_defined!($op, $method(&mut 0,0), 0, $lt, $rt);)+
|
||||
};
|
||||
($op:ident::$method:ident, $lt:ty) => {
|
||||
test_shift_assign_inner!($op::$method, $lt, i8, i16, i32, i64, isize, u8, u16, u32, u64, usize);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
test_shift_assign_inner!($op::$method, $lt, i128, u128);
|
||||
test_shift_assign_inner!(
|
||||
$op::$method, $lt,
|
||||
i8, i16, i32, i64, i128, isize,
|
||||
u8, u16, u32, u64, u128, usize
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -220,9 +224,11 @@ macro_rules! test_shift_assign {
|
|||
($test_name:ident, $op:ident::$method:ident) => {
|
||||
#[test]
|
||||
fn $test_name() {
|
||||
test_shift_assign!($op::$method, i8, i16, i32, i64, isize, u8, u16, u32, u64, usize);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
test_shift_assign!($op::$method, i128, u128);
|
||||
test_shift_assign!(
|
||||
$op::$method,
|
||||
i8, i16, i32, i64, i128, isize,
|
||||
u8, u16, u32, u64, u128, usize
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,14 +64,12 @@ wrapping_test!(test_wrapping_i8, i8, i8::MIN, i8::MAX);
|
|||
wrapping_test!(test_wrapping_i16, i16, i16::MIN, i16::MAX);
|
||||
wrapping_test!(test_wrapping_i32, i32, i32::MIN, i32::MAX);
|
||||
wrapping_test!(test_wrapping_i64, i64, i64::MIN, i64::MAX);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
wrapping_test!(test_wrapping_i128, i128, i128::MIN, i128::MAX);
|
||||
wrapping_test!(test_wrapping_isize, isize, isize::MIN, isize::MAX);
|
||||
wrapping_test!(test_wrapping_u8, u8, u8::MIN, u8::MAX);
|
||||
wrapping_test!(test_wrapping_u16, u16, u16::MIN, u16::MAX);
|
||||
wrapping_test!(test_wrapping_u32, u32, u32::MIN, u32::MAX);
|
||||
wrapping_test!(test_wrapping_u64, u64, u64::MIN, u64::MAX);
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
wrapping_test!(test_wrapping_u128, u128, u128::MIN, u128::MAX);
|
||||
wrapping_test!(test_wrapping_usize, usize, usize::MIN, usize::MAX);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ fn test_neg_zero() {
|
|||
assert_eq!(Fp::Zero, neg_zero.classify());
|
||||
}
|
||||
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "emscripten"), ignore)] // issue 42630
|
||||
#[test]
|
||||
fn test_one() {
|
||||
let one: f64 = 1.0f64;
|
||||
|
|
@ -165,7 +164,6 @@ fn test_is_finite() {
|
|||
assert!((-109.2f64).is_finite());
|
||||
}
|
||||
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "emscripten"), ignore)] // issue 42630
|
||||
#[test]
|
||||
fn test_is_normal() {
|
||||
let nan: f64 = f64::NAN;
|
||||
|
|
@ -183,7 +181,6 @@ fn test_is_normal() {
|
|||
assert!(!1e-308f64.is_normal());
|
||||
}
|
||||
|
||||
#[cfg_attr(all(target_arch = "wasm32", target_os = "emscripten"), ignore)] // issue 42630
|
||||
#[test]
|
||||
fn test_classify() {
|
||||
let nan: f64 = f64::NAN;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use crate::mem::MaybeUninit;
|
|||
use crate::ops::Deref;
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn read_until() {
|
||||
let mut buf = Cursor::new(&b"12"[..]);
|
||||
let mut v = Vec::new();
|
||||
|
|
@ -359,7 +358,6 @@ fn chain_zero_length_read_is_not_eof() {
|
|||
}
|
||||
|
||||
#[bench]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
#[cfg_attr(miri, ignore)] // Miri isn't fast...
|
||||
fn bench_read_to_end(b: &mut test::Bencher) {
|
||||
b.iter(|| {
|
||||
|
|
|
|||
|
|
@ -133,9 +133,7 @@ fn ignored_tests_result_in_ignored() {
|
|||
assert_eq!(result, TrIgnored);
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again (introduced by #65251)
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn test_should_panic() {
|
||||
fn f() -> Result<(), String> {
|
||||
|
|
@ -164,9 +162,7 @@ fn test_should_panic() {
|
|||
assert_eq!(result, TrOk);
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again (introduced by #65251)
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn test_should_panic_good_message() {
|
||||
fn f() -> Result<(), String> {
|
||||
|
|
@ -195,9 +191,7 @@ fn test_should_panic_good_message() {
|
|||
assert_eq!(result, TrOk);
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again (introduced by #65251)
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn test_should_panic_bad_message() {
|
||||
use crate::tests::TrFailedMsg;
|
||||
|
|
@ -231,9 +225,7 @@ fn test_should_panic_bad_message() {
|
|||
assert_eq!(result, TrFailedMsg(failed_msg.to_string()));
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again (introduced by #65251)
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn test_should_panic_non_string_message_type() {
|
||||
use std::any::TypeId;
|
||||
|
|
@ -272,9 +264,7 @@ fn test_should_panic_non_string_message_type() {
|
|||
assert_eq!(result, TrFailedMsg(failed_msg));
|
||||
}
|
||||
|
||||
// FIXME: Re-enable emscripten once it can catch panics again (introduced by #65251)
|
||||
#[test]
|
||||
#[cfg(not(target_os = "emscripten"))]
|
||||
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
|
||||
fn test_should_panic_but_succeeds() {
|
||||
let should_panic_variants = [ShouldPanic::Yes, ShouldPanic::YesWithMessage("error message")];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue