Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdisanti committed Nov 3, 2022
1 parent 50b0a4d commit 8f6e245
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rust-runtime/aws-smithy-json/src/deserialize/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,14 @@ pub mod test {
Ok(None),
expect_timestamp_or_null(value_null(0), Format::HttpDate)
);
for &invalid in &["NaN", "Infinity", "-Infinity"] {
for (invalid, display_name) in &[
("NaN", "NaN"),
("Infinity", "infinity"),
("-Infinity", "infinity"),
] {
assert_eq!(
Err(Error::custom(format!(
"{} is not a valid epoch",
invalid.replace('-', "")
"{display_name} is not a valid epoch"
))),
expect_timestamp_or_null(value_string(0, invalid), Format::EpochSeconds)
);
Expand Down

0 comments on commit 8f6e245

Please sign in to comment.