Skip to content

Commit 15e3412

Browse files
committed
fix(test): Ensure panics show test code, not lib
1 parent 2b7e335 commit 15e3412

File tree

1 file changed

+3
-0
lines changed
  • crates/cargo-test-support/src

1 file changed

+3
-0
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,7 @@ impl Execs {
908908
}
909909
}
910910

911+
#[track_caller]
911912
fn verify_checks_output(&self, stdout: &[u8], stderr: &[u8]) {
912913
if self.expect_exit_code.unwrap_or(0) != 0
913914
&& self.expect_stdout.is_none()
@@ -934,6 +935,7 @@ impl Execs {
934935
}
935936
}
936937

938+
#[track_caller]
937939
fn match_process(&self, process: &ProcessBuilder) -> Result<RawOutput> {
938940
println!("running {}", process);
939941
let res = if self.stream_output {
@@ -984,6 +986,7 @@ impl Execs {
984986
}
985987
}
986988

989+
#[track_caller]
987990
fn match_output(&self, code: Option<i32>, stdout: &[u8], stderr: &[u8]) -> Result<()> {
988991
self.verify_checks_output(stdout, stderr);
989992
let stdout = std::str::from_utf8(stdout).expect("stdout is not utf8");

0 commit comments

Comments
 (0)