From 361d3bc2f76f8b8abbb364d83e8fa6cc1ee63973 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:37:50 +0000 Subject: [PATCH] Move std::num unit tests to integration tests --- std/src/num.rs | 3 --- std/{src/num/tests.rs => tests/num.rs} | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) rename std/{src/num/tests.rs => tests/num.rs} (98%) diff --git a/std/src/num.rs b/std/src/num.rs index dd76081532f55..ffb8789c906ef 100644 --- a/std/src/num.rs +++ b/std/src/num.rs @@ -6,9 +6,6 @@ #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] -#[cfg(test)] -mod tests; - #[stable(feature = "int_error_matching", since = "1.55.0")] pub use core::num::IntErrorKind; #[stable(feature = "generic_nonzero", since = "1.79.0")] diff --git a/std/src/num/tests.rs b/std/tests/num.rs similarity index 98% rename from std/src/num/tests.rs rename to std/tests/num.rs index df0df3f23f756..a7400f1c02df0 100644 --- a/std/src/num/tests.rs +++ b/std/tests/num.rs @@ -1,4 +1,4 @@ -use crate::ops::Mul; +use std::ops::Mul; #[test] fn test_saturating_add_uint() { @@ -190,8 +190,8 @@ fn test_uint_to_str_overflow() { assert_eq!(u64_val.to_string(), "0"); } -fn from_str(t: &str) -> Option { - crate::str::FromStr::from_str(t).ok() +fn from_str(t: &str) -> Option { + std::str::FromStr::from_str(t).ok() } #[test]