From 80c9b38b32459adc7f6deb9c844eb92a6046a011 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 16 Jul 2024 05:08:30 -0400 Subject: [PATCH] Fix inaccurate estimate --- src/etc/test-float-parse/src/gen/exhaustive.rs | 2 +- src/etc/test-float-parse/src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/etc/test-float-parse/src/gen/exhaustive.rs b/src/etc/test-float-parse/src/gen/exhaustive.rs index 5d4b6df8e59b9..a31e886c2bf90 100644 --- a/src/etc/test-float-parse/src/gen/exhaustive.rs +++ b/src/etc/test-float-parse/src/gen/exhaustive.rs @@ -19,7 +19,7 @@ where type WriteCtx = F; fn total_tests() -> u64 { - F::Int::MAX.try_into().unwrap_or(u64::MAX) + F::Int::MAX.try_into().map_or(u64::MAX, |v: u64| v + 1) } fn new() -> Self { diff --git a/src/etc/test-float-parse/src/lib.rs b/src/etc/test-float-parse/src/lib.rs index f36e3928d26c0..0080d2f08a64a 100644 --- a/src/etc/test-float-parse/src/lib.rs +++ b/src/etc/test-float-parse/src/lib.rs @@ -75,7 +75,6 @@ pub fn run(cfg: Config, include: &[String], exclude: &[String]) -> ExitCode { rayon::ThreadPoolBuilder::new().num_threads(threads).build_global().unwrap(); let mut tests = register_tests(&cfg); - println!("registered"); let initial_tests: Vec<_> = tests.iter().map(|t| t.name.clone()).collect(); let unmatched: Vec<_> = include @@ -104,7 +103,6 @@ pub fn run(cfg: Config, include: &[String], exclude: &[String]) -> ExitCode { println!("Skipping test '{exc}'"); } - println!("launching"); let elapsed = launch_tests(&mut tests, &cfg); ui::finish(&tests, elapsed, &cfg) }