Skip to content

Commit

Permalink
Fix tests with serde >= 1.0.196 (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed May 3, 2024
2 parents 71d3099 + 1e4481c commit 3f066d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions serde_with/tests/chrono_0_4.rs
Expand Up @@ -456,9 +456,9 @@ fn test_chrono_timestamp_seconds() {
]],
);
check_error_deserialization::<StructStringStrict>(
r#"0.0"#,
r#"0.1"#,
expect![[
r#"invalid type: floating point `0`, expected a string containing a number at line 1 column 3"#
r#"invalid type: floating point `0.1`, expected a string containing a number at line 1 column 3"#
]],
);

Expand Down Expand Up @@ -547,8 +547,8 @@ fn test_chrono_timestamp_seconds_with_frac() {
expect![[r#"invalid type: integer `1`, expected a string at line 1 column 1"#]],
);
check_error_deserialization::<StructStringStrict>(
r#"0.0"#,
expect![[r#"invalid type: floating point `0`, expected a string at line 1 column 3"#]],
r#"0.1"#,
expect![[r#"invalid type: floating point `0.1`, expected a string at line 1 column 3"#]],
);

#[serde_as]
Expand Down
8 changes: 4 additions & 4 deletions serde_with/tests/serde_as/time.rs
Expand Up @@ -324,9 +324,9 @@ fn test_timestamp_seconds_systemtime() {
]],
);
check_error_deserialization::<StructStringStrict>(
r#"0.0"#,
r#"0.1"#,
expect![[
r#"invalid type: floating point `0`, expected a string containing a number at line 1 column 3"#
r#"invalid type: floating point `0.1`, expected a string containing a number at line 1 column 3"#
]],
);

Expand Down Expand Up @@ -423,8 +423,8 @@ fn test_timestamp_seconds_with_frac_systemtime() {
expect![[r#"invalid type: integer `1`, expected a string at line 1 column 1"#]],
);
check_error_deserialization::<StructStringStrict>(
r#"0.0"#,
expect![[r#"invalid type: floating point `0`, expected a string at line 1 column 3"#]],
r#"0.1"#,
expect![[r#"invalid type: floating point `0.1`, expected a string at line 1 column 3"#]],
);

#[serde_as]
Expand Down

0 comments on commit 3f066d7

Please sign in to comment.