Skip to content

Commit

Permalink
Fixed test against new format and
Browse files Browse the repository at this point in the history
correct a name
  • Loading branch information
la10736 committed Aug 12, 2023
1 parent cf4bf3d commit 3173f62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion rstest/tests/resources/rstest/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async fn error_future_on_impl_type(

#[rstest]
#[case(async { 42 } )]
async fn error_future_on_impl_type(
async fn error_future_more_than_once(
#[case]
#[future]
#[future]
Expand Down
30 changes: 15 additions & 15 deletions rstest/tests/rstest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1468,10 +1468,10 @@ mod should_show_correct_errors {
output.stderr.str(),
format!(
"
--> {}/src/lib.rs:90:57
--> {}/src/lib.rs:93:8
|
90 | async fn error_future_on_impl_type(#[case] #[future] s: impl AsRef<str>) {{}}
| ^^^^^^^^^^^^^^^
93 | s: impl AsRef<str>,
| ^^^^^^^^^^^^^^^
",
name
)
Expand All @@ -1487,10 +1487,10 @@ mod should_show_correct_errors {
output.stderr.str(),
format!(
"
--> {}/src/lib.rs:94:54
|
94 | async fn error_future_on_impl_type(#[case] #[future] #[future] a: i32) {{}}
| ^^^^^^^^^
--> {}/src/lib.rs:102:5
|
102 | #[future]
| ^^^^^^^^^
",
name
)
Expand All @@ -1507,10 +1507,10 @@ mod should_show_correct_errors {
format!(
"
error: expected attribute arguments in parentheses: #[timeout(...)]
--> {}/src/lib.rs:97:3
|
97 | #[timeout]
| ^^^^^^^
--> {}/src/lib.rs:108:3
|
108 | #[timeout]
| ^^^^^^^
",
name
)
Expand All @@ -1527,9 +1527,9 @@ mod should_show_correct_errors {
format!(
"
error: expected an expression
--> {}/src/lib.rs:101:17
--> {}/src/lib.rs:112:17
|
101 | #[timeout(some -> strange -> invalid -> expression)]
112 | #[timeout(some -> strange -> invalid -> expression)]
| ^
",
name
Expand All @@ -1547,7 +1547,7 @@ mod should_show_correct_errors {
format!(
"
error[E0308]: mismatched types
--> {}/src/lib.rs:105:11",
--> {}/src/lib.rs:116:11",
name
)
.unindent()
Expand All @@ -1556,7 +1556,7 @@ mod should_show_correct_errors {
assert_in!(
output.stderr.str(),
"
105 | #[timeout(42)]
116 | #[timeout(42)]
| ^^ expected `Duration`, found integer
"
.unindent()
Expand Down

0 comments on commit 3173f62

Please sign in to comment.