From 1f448e47751d0f914134b0e9138fdb1a5a95d55c Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Tue, 26 Sep 2023 00:31:44 +0700 Subject: [PATCH] fix(tests): Fix `cargo test` with default features. (#294) A couple of tests require `fancy-no-backtrace`, so mark them accordingly. --- tests/test_diagnostic_source_macro.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_diagnostic_source_macro.rs b/tests/test_diagnostic_source_macro.rs index 0ca396a..334ca34 100644 --- a/tests/test_diagnostic_source_macro.rs +++ b/tests/test_diagnostic_source_macro.rs @@ -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 { @@ -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 { @@ -147,6 +149,7 @@ struct NestedError { the_other_err: Box, } +#[cfg(feature = "fancy-no-backtrace")] #[test] fn test_nested_diagnostic_source_is_output() { let inner_error = TestStructError {