summaryrefslogtreecommitdiffstats
path: root/library/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /library/test
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/test')
-rw-r--r--library/test/src/helpers/shuffle.rs3
-rw-r--r--library/test/src/lib.rs11
-rw-r--r--library/test/src/term/terminfo/parm/tests.rs2
-rw-r--r--library/test/src/tests.rs17
4 files changed, 6 insertions, 27 deletions
diff --git a/library/test/src/helpers/shuffle.rs b/library/test/src/helpers/shuffle.rs
index ca503106c..2ac3bfbd4 100644
--- a/library/test/src/helpers/shuffle.rs
+++ b/library/test/src/helpers/shuffle.rs
@@ -1,7 +1,6 @@
use crate::cli::TestOpts;
use crate::types::{TestDescAndFn, TestId, TestName};
-use std::collections::hash_map::DefaultHasher;
-use std::hash::Hasher;
+use std::hash::{DefaultHasher, Hasher};
use std::time::{SystemTime, UNIX_EPOCH};
pub fn get_shuffle_seed(opts: &TestOpts) -> Option<u64> {
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index bddf75dff..2fa5a8e5e 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -16,8 +16,8 @@
#![unstable(feature = "test", issue = "50297")]
#![doc(test(attr(deny(warnings))))]
-#![cfg_attr(not(bootstrap), doc(rust_logo))]
-#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
+#![doc(rust_logo)]
+#![feature(rustdoc_internals)]
#![feature(internal_output_capture)]
#![feature(staged_api)]
#![feature(process_exitcode_internals)]
@@ -264,8 +264,8 @@ pub fn run_tests<F>(
where
F: FnMut(TestEvent) -> io::Result<()>,
{
- use std::collections::{self, HashMap};
- use std::hash::BuildHasherDefault;
+ use std::collections::HashMap;
+ use std::hash::{BuildHasherDefault, DefaultHasher};
use std::sync::mpsc::RecvTimeoutError;
struct RunningTest {
@@ -286,8 +286,7 @@ where
}
// Use a deterministic hasher
- type TestMap =
- HashMap<TestId, RunningTest, BuildHasherDefault<collections::hash_map::DefaultHasher>>;
+ type TestMap = HashMap<TestId, RunningTest, BuildHasherDefault<DefaultHasher>>;
struct TimeoutEntry {
id: TestId,
diff --git a/library/test/src/term/terminfo/parm/tests.rs b/library/test/src/term/terminfo/parm/tests.rs
index c738f3ba0..e785d84f3 100644
--- a/library/test/src/term/terminfo/parm/tests.rs
+++ b/library/test/src/term/terminfo/parm/tests.rs
@@ -1,7 +1,5 @@
use super::*;
-use std::result::Result::Ok;
-
#[test]
fn test_basic_setabf() {
let s = b"\\E[48;5;%p1%dm";
diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
index 4ef18b14f..43a906ad2 100644
--- a/library/test/src/tests.rs
+++ b/library/test/src/tests.rs
@@ -1,34 +1,17 @@
use super::*;
use crate::{
- bench::Bencher,
console::OutputLocation,
formatters::PrettyFormatter,
- options::OutputFormat,
test::{
- filter_tests,
parse_opts,
- run_test,
- DynTestFn,
- DynTestName,
MetricMap,
- RunIgnored,
- RunStrategy,
- ShouldPanic,
- StaticTestName,
- TestDesc,
- TestDescAndFn,
- TestOpts,
- TrIgnored,
- TrOk,
// FIXME (introduced by #65251)
// ShouldPanic, StaticTestName, TestDesc, TestDescAndFn, TestOpts, TestTimeOptions,
// TestType, TrFailedMsg, TrIgnored, TrOk,
},
time::{TestTimeOptions, TimeThreshold},
};
-use std::sync::mpsc::channel;
-use std::time::Duration;
impl TestOpts {
fn new() -> TestOpts {