Skip to content

Commit 3e4c205

Browse files
Emilgardisjyn514
authored andcommitted
add #[track_caller] to test wrapper
this makes it easier to identify what test failed, pointing to the caller of wrapper instead of the wrapper fn ``` panicked at 'the test failed', src/web/rustdoc.rs:line:col ```
1 parent b194f43 commit 3e4c205

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use reqwest::{
2020
use std::{fs, net::SocketAddr, panic, sync::Arc, time::Duration};
2121
use tokio::runtime::Runtime;
2222

23+
#[track_caller]
2324
pub(crate) fn wrapper(f: impl FnOnce(&TestEnvironment) -> Result<()>) {
2425
let env = TestEnvironment::new();
2526
// if we didn't catch the panic, the server would hang forever

0 commit comments

Comments
 (0)