Skip to content

Commit fadde7c

Browse files
Gealepage
andauthored
Ensure prop tests treat inf/nan the same (#1600)
Co-authored-by: Ed Page <eopage@gmail.com>
1 parent 400331e commit fadde7c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

proptest-regressions/number/streaming.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
# It is recommended to check this file in to source control so that
66
# everyone who runs the test benefits from these saved cases.
77
cc 68154e0c90b20374781d3e3932bddb80e8c6a97901d0331bbd7e6daa75b794cb # shrinks to s = "0e"
8+
cc d31506b74ad24a80485adb176039e2fa82cf58798738288a2c810952c68d7600 # shrinks to s = "inf"

src/number/complete.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ mod tests {
21112111

21122112
#[cfg(feature = "std")]
21132113
fn parse_f64(i: &str) -> IResult<&str, f64, ()> {
2114-
match recognize_float(i) {
2114+
match recognize_float_or_exceptions(i) {
21152115
Err(e) => Err(e),
21162116
Ok((i, s)) => {
21172117
if s.is_empty() {

src/number/streaming.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ mod tests {
21912191
#[cfg(feature = "std")]
21922192
fn parse_f64(i: &str) -> IResult<&str, f64, ()> {
21932193
use crate::traits::ParseTo;
2194-
match recognize_float(i) {
2194+
match recognize_float_or_exceptions(i) {
21952195
Err(e) => Err(e),
21962196
Ok((i, s)) => {
21972197
if s.is_empty() {

0 commit comments

Comments
 (0)