Skip to content

Commit 3dc078b

Browse files
committed
1 parent 0d8a298 commit 3dc078b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cast_checks/tests/inner_attribute_example.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ cast_checks not descending into `mod c;` at src/lib.rs:3:0
2323
#[test]
2424
fn test() {
2525
run_command("test", |mut command| {
26-
command.assert().failure().stdout(predicates::str::contains(
27-
"\
28-
thread 'checked_truncation' panicked at src/lib.rs:3:1:
29-
invalid cast in `x as u16` at src/lib.rs:3:0: TryFromIntError(())
26+
command.assert().failure().stdout(
27+
predicates::str::is_match(
28+
r"\
29+
thread 'checked_truncation' \([0-9]*\) panicked at src/lib\.rs:3:1:
30+
invalid cast in `x as u16` at src/lib\.rs:3:0: TryFromIntError\(\(\)\)
3031
",
31-
));
32+
)
33+
.unwrap(),
34+
);
3235
});
3336
}
3437

0 commit comments

Comments
 (0)