diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-02-25 06:09:33 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-05-13 22:22:15 +0000 |
| commit | 48f3e63f709ec4a19fa2bdce33893fdc45006e46 (patch) | |
| tree | 0ed5fb3037215898a4d9ac52e214bd291c114e01 | |
| parent | 36790d28810ac188a8bca7fc9e95fe0869ae9a11 (diff) | |
| download | rust-48f3e63f709ec4a19fa2bdce33893fdc45006e46.tar.gz rust-48f3e63f709ec4a19fa2bdce33893fdc45006e46.zip | |
Move float tests from std to core
Many float-related tests in `std` only depend on `core`, so move the tests there. This also allows us to verify functions from `core_float_math`. Since the majority of test files need to be moved to `coretests`, move the files here without any cleanup; this is done in a followup commit. This makes git history slightly cleaner, but coretests will not build immediately after this commit.
| -rw-r--r-- | library/coretests/Cargo.toml | 11 | ||||
| -rw-r--r-- | library/coretests/tests/floats/f128.rs (renamed from library/std/tests/floats/f128.rs) | 0 | ||||
| -rw-r--r-- | library/coretests/tests/floats/f16.rs (renamed from library/std/tests/floats/f16.rs) | 0 | ||||
| -rw-r--r-- | library/coretests/tests/floats/f32.rs (renamed from library/std/tests/floats/f32.rs) | 0 | ||||
| -rw-r--r-- | library/coretests/tests/floats/f64.rs (renamed from library/std/tests/floats/f64.rs) | 0 | ||||
| -rw-r--r-- | library/coretests/tests/floats/mod.rs (renamed from library/std/tests/floats/lib.rs) | 0 | ||||
| -rw-r--r-- | library/coretests/tests/lib.rs | 1 |
7 files changed, 12 insertions, 0 deletions
diff --git a/library/coretests/Cargo.toml b/library/coretests/Cargo.toml index 7656388d24b..e0ddcd466ae 100644 --- a/library/coretests/Cargo.toml +++ b/library/coretests/Cargo.toml @@ -26,3 +26,14 @@ test = true [dev-dependencies] rand = { version = "0.9.0", default-features = false } rand_xorshift = { version = "0.4.0", default-features = false } + +[lints.rust.unexpected_cfgs] +level = "warn" +check-cfg = [ + # Internal features aren't marked known config by default, we use these to + # gate tests. + 'cfg(target_has_reliable_f16)', + 'cfg(target_has_reliable_f16_math)', + 'cfg(target_has_reliable_f128)', + 'cfg(target_has_reliable_f128_math)', +] diff --git a/library/std/tests/floats/f128.rs b/library/coretests/tests/floats/f128.rs index c2618f3b315..c2618f3b315 100644 --- a/library/std/tests/floats/f128.rs +++ b/library/coretests/tests/floats/f128.rs diff --git a/library/std/tests/floats/f16.rs b/library/coretests/tests/floats/f16.rs index 70bbcd07160..70bbcd07160 100644 --- a/library/std/tests/floats/f16.rs +++ b/library/coretests/tests/floats/f16.rs diff --git a/library/std/tests/floats/f32.rs b/library/coretests/tests/floats/f32.rs index 9af23afc5bb..9af23afc5bb 100644 --- a/library/std/tests/floats/f32.rs +++ b/library/coretests/tests/floats/f32.rs diff --git a/library/std/tests/floats/f64.rs b/library/coretests/tests/floats/f64.rs index de9c27eb33d..de9c27eb33d 100644 --- a/library/std/tests/floats/f64.rs +++ b/library/coretests/tests/floats/f64.rs diff --git a/library/std/tests/floats/lib.rs b/library/coretests/tests/floats/mod.rs index 453a2d533ab..453a2d533ab 100644 --- a/library/std/tests/floats/lib.rs +++ b/library/coretests/tests/floats/mod.rs diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index 0575375cf4f..acea0b2a035 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -144,6 +144,7 @@ mod cmp; mod const_ptr; mod convert; mod ffi; +mod floats; mod fmt; mod future; mod hash; |
