Skip to content

Commit

Permalink
Add test containing field index that looks like float literal
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 24, 2021
1 parent 645641c commit 7aac981
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_ensure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ fn test_trailer() {
let test = || Ok(ensure!((2, 3).1 == 2));
assert_err(test, "Condition failed: `(2, 3).1 == 2` (3 vs 2)");

let test = || Ok(ensure!((2, (3, 4)). 1.1 == 2));
assert_err(test, "Condition failed: `(2, (3, 4)).1.1 == 2` (4 vs 2)");

let err = anyhow!("");
let test = || Ok(ensure!(err.is::<&str>() == false));
assert_err(
Expand Down

0 comments on commit 7aac981

Please sign in to comment.