Add a test for #3030
This commit is contained in:
parent
4c1b0c2241
commit
efe24bd7e7
2 changed files with 27 additions and 0 deletions
|
|
@ -521,3 +521,18 @@ fn issue_3040() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// #3030
|
||||
fn issue_3030() {
|
||||
match input.trim().parse::<f64>() {
|
||||
Ok(val)
|
||||
if !(
|
||||
// A valid number is the same as what rust considers to be valid,
|
||||
// except for +1., NaN, and Infinity.
|
||||
val.is_infinite() || val
|
||||
.is_nan() || input.ends_with(".") || input.starts_with("+")
|
||||
)
|
||||
=> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -552,3 +552,15 @@ fn issue_3040() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// #3030
|
||||
fn issue_3030() {
|
||||
match input.trim().parse::<f64>() {
|
||||
Ok(val)
|
||||
if !(
|
||||
// A valid number is the same as what rust considers to be valid,
|
||||
// except for +1., NaN, and Infinity.
|
||||
val.is_infinite() || val.is_nan() || input.ends_with(".") || input.starts_with("+")
|
||||
) => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue