Skip to content

Commit

Permalink
fix(tests): Fix cargo test with default features. (#294)
Browse files Browse the repository at this point in the history
A couple of tests require `fancy-no-backtrace`, so mark them
accordingly.
  • Loading branch information
waywardmonkeys authored Sep 25, 2023
1 parent db0b7e4 commit 1f448e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_diagnostic_source_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fn test_diagnostic_source() {
assert!(error.diagnostic_source().is_some());
}

#[cfg(feature = "fancy-no-backtrace")]
#[test]
fn test_diagnostic_source_pass_extra_info() {
let diag = TestBoxedError(Box::new(SourceError {
Expand Down Expand Up @@ -106,6 +107,7 @@ fn test_diagnostic_source_pass_extra_info() {
assert_eq!(expected, out);
}

#[cfg(feature = "fancy-no-backtrace")]
#[test]
fn test_diagnostic_source_is_output() {
let diag = TestStructError {
Expand Down Expand Up @@ -147,6 +149,7 @@ struct NestedError {
the_other_err: Box<dyn Diagnostic>,
}

#[cfg(feature = "fancy-no-backtrace")]
#[test]
fn test_nested_diagnostic_source_is_output() {
let inner_error = TestStructError {
Expand Down

0 comments on commit 1f448e4

Please sign in to comment.