diff options
Diffstat (limited to 'cli/tools/test/reporters')
-rw-r--r-- | cli/tools/test/reporters/common.rs | 12 | ||||
-rw-r--r-- | cli/tools/test/reporters/dot.rs | 6 | ||||
-rw-r--r-- | cli/tools/test/reporters/pretty.rs | 6 |
3 files changed, 13 insertions, 11 deletions
diff --git a/cli/tools/test/reporters/common.rs b/cli/tools/test/reporters/common.rs index 3d9cdba46..1dc879667 100644 --- a/cli/tools/test/reporters/common.rs +++ b/cli/tools/test/reporters/common.rs @@ -33,7 +33,10 @@ pub(super) fn format_test_step_ancestry( result } -pub fn format_test_for_summary(cwd: &Url, desc: &TestDescription) -> String { +pub fn format_test_for_summary( + cwd: &Url, + desc: &TestFailureDescription, +) -> String { format!( "{} {}", &desc.name, @@ -78,7 +81,7 @@ pub(super) fn report_sigint( let mut formatted_pending = BTreeSet::new(); for id in tests_pending { if let Some(desc) = tests.get(id) { - formatted_pending.insert(format_test_for_summary(cwd, desc)); + formatted_pending.insert(format_test_for_summary(cwd, &desc.into())); } if let Some(desc) = test_steps.get(id) { formatted_pending @@ -107,7 +110,10 @@ pub(super) fn report_summary( #[allow(clippy::type_complexity)] // Type alias doesn't look better here let mut failures_by_origin: BTreeMap< String, - (Vec<(&TestDescription, &TestFailure)>, Option<&JsError>), + ( + Vec<(&TestFailureDescription, &TestFailure)>, + Option<&JsError>, + ), > = BTreeMap::default(); let mut failure_titles = vec![]; for (description, failure) in &summary.failures { diff --git a/cli/tools/test/reporters/dot.rs b/cli/tools/test/reporters/dot.rs index 0df000dad..39a4e44d9 100644 --- a/cli/tools/test/reporters/dot.rs +++ b/cli/tools/test/reporters/dot.rs @@ -113,7 +113,7 @@ impl TestReporter for DotTestReporter { self .summary .failures - .push((description.clone(), failure.clone())); + .push((description.into(), failure.clone())); } TestResult::Cancelled => { self.summary.failed += 1; @@ -162,11 +162,9 @@ impl TestReporter for DotTestReporter { TestStepResult::Failed(failure) => { self.summary.failed_steps += 1; self.summary.failures.push(( - TestDescription { + TestFailureDescription { id: desc.id, name: common::format_test_step_ancestry(desc, tests, test_steps), - ignore: false, - only: false, origin: desc.origin.clone(), location: desc.location.clone(), }, diff --git a/cli/tools/test/reporters/pretty.rs b/cli/tools/test/reporters/pretty.rs index 4a96192e6..c49081dd6 100644 --- a/cli/tools/test/reporters/pretty.rs +++ b/cli/tools/test/reporters/pretty.rs @@ -233,7 +233,7 @@ impl TestReporter for PrettyTestReporter { self .summary .failures - .push((description.clone(), failure.clone())); + .push((description.into(), failure.clone())); } TestResult::Cancelled => { self.summary.failed += 1; @@ -318,11 +318,9 @@ impl TestReporter for PrettyTestReporter { TestStepResult::Failed(failure) => { self.summary.failed_steps += 1; self.summary.failures.push(( - TestDescription { + TestFailureDescription { id: desc.id, name: common::format_test_step_ancestry(desc, tests, test_steps), - ignore: false, - only: false, origin: desc.origin.clone(), location: desc.location.clone(), }, |