Skip to content

Commit

Permalink
fix: consistent naming and duplicated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Jun 28, 2024
1 parent 0eabf81 commit c98bc8c
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions eyre/tests/test_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c98bc8c

Please sign in to comment.