Skip to content

Commit

Permalink
Ensure prop tests treat inf/nan the same (#1600)
Browse files Browse the repository at this point in the history
Co-authored-by: Ed Page <eopage@gmail.com>
  • Loading branch information
Geal and epage committed Dec 30, 2022
1 parent 400331e commit fadde7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions proptest-regressions/number/streaming.txt
Expand Up @@ -5,3 +5,4 @@
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc 68154e0c90b20374781d3e3932bddb80e8c6a97901d0331bbd7e6daa75b794cb # shrinks to s = "0e"
cc d31506b74ad24a80485adb176039e2fa82cf58798738288a2c810952c68d7600 # shrinks to s = "inf"
2 changes: 1 addition & 1 deletion src/number/complete.rs
Expand Up @@ -2111,7 +2111,7 @@ mod tests {

#[cfg(feature = "std")]
fn parse_f64(i: &str) -> IResult<&str, f64, ()> {
match recognize_float(i) {
match recognize_float_or_exceptions(i) {
Err(e) => Err(e),
Ok((i, s)) => {
if s.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion src/number/streaming.rs
Expand Up @@ -2191,7 +2191,7 @@ mod tests {
#[cfg(feature = "std")]
fn parse_f64(i: &str) -> IResult<&str, f64, ()> {
use crate::traits::ParseTo;
match recognize_float(i) {
match recognize_float_or_exceptions(i) {
Err(e) => Err(e),
Ok((i, s)) => {
if s.is_empty() {
Expand Down

0 comments on commit fadde7c

Please sign in to comment.