fix(tests): Fix `cargo test` with default features. (#294)

A couple of tests require `fancy-no-backtrace`, so mark them
accordingly.
This commit is contained in:
Bruce Mitchener 2023-09-26 00:31:44 +07:00 committed by GitHub
parent db0b7e403a
commit 1f448e4775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,7 @@ fn test_diagnostic_source() {
assert!(error.diagnostic_source().is_some()); assert!(error.diagnostic_source().is_some());
} }
#[cfg(feature = "fancy-no-backtrace")]
#[test] #[test]
fn test_diagnostic_source_pass_extra_info() { fn test_diagnostic_source_pass_extra_info() {
let diag = TestBoxedError(Box::new(SourceError { let diag = TestBoxedError(Box::new(SourceError {
@ -106,6 +107,7 @@ fn test_diagnostic_source_pass_extra_info() {
assert_eq!(expected, out); assert_eq!(expected, out);
} }
#[cfg(feature = "fancy-no-backtrace")]
#[test] #[test]
fn test_diagnostic_source_is_output() { fn test_diagnostic_source_is_output() {
let diag = TestStructError { let diag = TestStructError {
@ -147,6 +149,7 @@ struct NestedError {
the_other_err: Box<dyn Diagnostic>, the_other_err: Box<dyn Diagnostic>,
} }
#[cfg(feature = "fancy-no-backtrace")]
#[test] #[test]
fn test_nested_diagnostic_source_is_output() { fn test_nested_diagnostic_source_is_output() {
let inner_error = TestStructError { let inner_error = TestStructError {