fix: consistent naming and duplicated tests

This commit is contained in:
Tei Leelo Roberts 2024-06-28 17:39:22 +02:00
parent 0eabf81eef
commit c98bc8cc1c

View File

@ -131,36 +131,6 @@ fn test_with_context() {
println!("{:?}", err);
}
#[cfg(feature = "anyhow")]
#[test]
fn test_option_compat_wrap_err() {
let _ = eyre::set_hook(Box::new(|_e| {
let expected_location = file!();
Box::new(LocationHandler::new(expected_location))
}));
use eyre::ContextCompat;
let err = None::<()>.context("oopsie").unwrap_err();
// should panic if the location isn't in our crate
println!("{:?}", err);
}
#[cfg(feature = "anyhow")]
#[test]
fn test_option_compat_wrap_err_with() {
let _ = eyre::set_hook(Box::new(|_e| {
let expected_location = file!();
Box::new(LocationHandler::new(expected_location))
}));
use eyre::ContextCompat;
let err = None::<()>.with_context(|| "oopsie").unwrap_err();
// should panic if the location isn't in our crate
println!("{:?}", err);
}
#[cfg(feature = "anyhow")]
#[test]
fn test_option_compat_context() {