#![unstable(feature = "test", issue = "27812")]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
#![feature(asm)]
-#![feature(fnbox)]
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc, rustc_private))]
#![feature(nll)]
#![feature(set_stdio)]
use term;
// FIXME(#54291): rustc and/or LLVM don't yet support building with panic-unwind
-// on aarch64-pc-windows-msvc, so we don't link libtest against
-// libunwind (for the time being), even though it means that
-// libtest won't be fully functional on this platform.
+// on aarch64-pc-windows-msvc, or thumbv7a-pc-windows-msvc
+// so we don't link libtest against libunwind (for the time being)
+// even though it means that libtest won't be fully functional on
+// these platforms.
//
// See also: https://github.com/rust-lang/rust/issues/54190#issuecomment-422904437
-#[cfg(not(all(windows, target_arch = "aarch64")))]
+#[cfg(not(all(windows, any(target_arch = "aarch64", target_arch = "arm"))))]
extern crate panic_unwind;
pub use self::ColorConfig::*;
use std::any::Any;
use std::borrow::Cow;
-use std::boxed::FnBox;
use std::cmp;
use std::collections::BTreeMap;
use std::env;
pub enum TestFn {
StaticTestFn(fn()),
StaticBenchFn(fn(&mut Bencher)),
- DynTestFn(Box<dyn FnBox() + Send>),
+ DynTestFn(Box<dyn FnOnce() + Send>),
DynBenchFn(Box<dyn TDynBenchFn + 'static>),
}
#[cfg(any(
target_os = "freebsd",
target_os = "dragonfly",
- target_os = "bitrig",
target_os = "netbsd"
))]
fn num_cpus() -> usize {
desc: TestDesc,
monitor_ch: Sender<MonitorMsg>,
nocapture: bool,
- testfn: Box<dyn FnBox() + Send>,
+ testfn: Box<dyn FnOnce() + Send>,
concurrency: Concurrent,
) {
// Buffer for capturing standard I/O
if desc.allow_fail {
TrAllowedFail
} else {
- TrFailedMsg(format!("Panic did not include expected string '{}'", msg))
+ TrFailedMsg(format!("panic did not include expected string '{}'", msg))
}
}
}
panic!("an error message");
}
let expected = "foobar";
- let failed_msg = "Panic did not include expected string";
+ let failed_msg = "panic did not include expected string";
let desc = TestDescAndFn {
desc: TestDesc {
name: StaticTestName("whatever"),