tor-error: tests: Add a test case for Report and Bug wrapping
This commit is contained in:
parent
4181ccb8cc
commit
8a28cb2d14
|
@ -291,6 +291,17 @@ mod test {
|
|||
assert!(s.contains("Couldn't wobble the wobbling device."));
|
||||
#[cfg(feature = "backtrace")]
|
||||
assert!(s.contains("internal_macro_test"));
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
enum Wrap {
|
||||
#[error("Internal error")]
|
||||
Internal(#[from] Bug),
|
||||
}
|
||||
|
||||
let w: Wrap = e.into();
|
||||
let s = format!("Got: {}", w.report());
|
||||
dbg!(&s);
|
||||
assert!(s.contains("Couldn't wobble the wobbling device."));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in New Issue