summaryrefslogtreecommitdiffstats
path: root/library/core/tests/num
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /library/core/tests/num
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/core/tests/num')
-rw-r--r--library/core/tests/num/dec2flt/mod.rs11
-rw-r--r--library/core/tests/num/dec2flt/parse.rs2
2 files changed, 1 insertions, 12 deletions
diff --git a/library/core/tests/num/dec2flt/mod.rs b/library/core/tests/num/dec2flt/mod.rs
index a2b9bb551..874e0ec70 100644
--- a/library/core/tests/num/dec2flt/mod.rs
+++ b/library/core/tests/num/dec2flt/mod.rs
@@ -127,14 +127,3 @@ fn massive_exponent() {
assert_eq!(format!("1e-{max}000").parse(), Ok(0.0));
assert_eq!(format!("1e{max}000").parse(), Ok(f64::INFINITY));
}
-
-#[test]
-fn borderline_overflow() {
- let mut s = "0.".to_string();
- for _ in 0..375 {
- s.push('3');
- }
- // At the time of this writing, this returns Err(..), but this is a bug that should be fixed.
- // It makes no sense to enshrine that in a test, the important part is that it doesn't panic.
- let _ = s.parse::<f64>();
-}
diff --git a/library/core/tests/num/dec2flt/parse.rs b/library/core/tests/num/dec2flt/parse.rs
index edc77377d..4a5d24ba7 100644
--- a/library/core/tests/num/dec2flt/parse.rs
+++ b/library/core/tests/num/dec2flt/parse.rs
@@ -32,7 +32,7 @@ fn invalid_chars() {
}
fn parse_positive(s: &[u8]) -> Option<Number> {
- parse_number(s, false)
+ parse_number(s)
}
#[test]