mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-26 20:40:49 +00:00
fix: consistent naming and duplicated tests
This commit is contained in:
parent
0eabf81eef
commit
c98bc8cc1c
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user