Skip to content

Commit

Permalink
seq:update test for floating points
Browse files Browse the repository at this point in the history
Now test_parse_float_from_invalid_values checks the error code.

Issue uutils#6935
  • Loading branch information
alexs-sh committed Dec 14, 2024
1 parent e368cea commit 017ab3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/seq/src/floatparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn parse_fractional_part(s: &str) -> Result<f64, ParseNumberError> {
#[cfg(test)]
mod tests {
use super::{parse_float, parse_hexadecimal_float};
use crate::ExtendedBigDecimal;
use crate::{numberparse::ParseNumberError, ExtendedBigDecimal};
use num_traits::ToPrimitive;
#[test]
#[allow(clippy::cognitive_complexity)]
Expand All @@ -116,7 +116,7 @@ mod tests {
];

for s in samples {
assert_eq!(parse_float(s).is_err(), true);
assert_eq!(parse_float(s).unwrap_err(), ParseNumberError::Float);
}
}

Expand Down

0 comments on commit 017ab3d

Please sign in to comment.