Skip to content

Commit

Permalink
Add test for issue 136
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 26, 2021
1 parent df0dcc7 commit db6e880
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,33 @@ Additional crates such as `pyo3-asyncio` can be used to integrate async Rust and
10 | async fn async_function() {}
| ^^^^^
"}

// FIXME: should strip the line numbers on src/handler.rs
test_normalize! {test_dropshot_required_by
DIR="/git/dropshot/dropshot"
WORKSPACE="/git/dropshot"
"
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
--> /git/dropshot/dropshot/tests/fail/bad_endpoint4.rs:24:14
|
24 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
|
note: required by a bound in `dropshot::Query`
--> /git/dropshot/dropshot/src/handler.rs:547:48
|
547 | pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `dropshot::Query`
" "
error[E0277]: the trait bound `QueryParams: schemars::JsonSchema` is not satisfied
--> tests/fail/bad_endpoint4.rs:24:14
|
24 | _params: Query<QueryParams>,
| ^^^^^^^^^^^^^^^^^^ the trait `schemars::JsonSchema` is not implemented for `QueryParams`
|
note: required by a bound in `dropshot::Query`
--> src/handler.rs:547:48
|
547 | pub struct Query<QueryType: DeserializeOwned + JsonSchema + Send + Sync> {
| ^^^^^^^^^^ required by this bound in `dropshot::Query`
"}

0 comments on commit db6e880

Please sign in to comment.