From 2042ee13fe316c5e56033a5a014470061415cd29 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 13 Nov 2026 01:22:39 +0100 Subject: [PATCH] AEP #3319: remove duplicate integrated report test module --- crates/aep/src/export/report.rs | 53 --------------------------------- 1 file changed, 53 deletions(-) diff --git a/crates/aep/src/export/report.rs b/crates/aep/src/export/report.rs index f409fb4ab..528af5dba 100644 --- a/crates/aep/src/export/report.rs +++ b/crates/aep/src/export/report.rs @@ -311,56 +311,3 @@ mod tests { assert_eq!(report.losses[0].unlisted, 5); } } - -#[cfg(test)] -mod tests { - use super::*; - - /// A report with losses in two categories, as the collector finishes it. - fn collected() -> ExportReport { - let mut col = Collector::default(); - col.exported.layers = 2; - col.lose(LossCategory::RoundedTimes, "time 1"); - col.lose(LossCategory::Effects, String::from("fx 1")); - col.lose(LossCategory::Effects, "fx 2"); - let mut report = col.finish(); - report.limitations.truncate(1); - report.limitations[0] = "limit".into(); - report - } - - /// The JSON shape agents read: field names, category spelling, order and the loss entries. - #[test] - fn the_json_shape_is_pinned() { - let json = serde_json::to_string(&collected()).unwrap(); - assert_eq!( - json, - r#"{"exported":{"folders":0,"compositions":0,"solids":0,"layers":2,"solidLayers":0,"nullLayers":0,"adjustmentLayers":0,"properties":0,"keyframes":0,"expressions":0,"masks":0,"precompLayers":0,"effects":0,"footage":0,"footageLayers":0,"textLayers":0,"markers":0,"cameras":0,"lights":0,"shapeLayers":0,"timeRemaps":0,"textAnimators":0,"layerStyles":0},"losses":[{"category":"effects","count":2,"details":["fx 1","fx 2"],"unlisted":0},{"category":"rounded_times","count":1,"details":["time 1"],"unlisted":0}],"limitations":["limit"]}"# - ); - let back: ExportReport = serde_json::from_str(&json).unwrap(); - assert_eq!(back, collected()); - } - - /// The queries read the losses. - #[test] - fn the_queries_read_the_losses() { - let report = collected(); - assert_eq!((report.total_losses(), report.is_lossless()), (3, false)); - assert_eq!((report.count(LossCategory::Effects), report.count(LossCategory::Lights)), (2, 0)); - assert_eq!(report.summary(), "effects: 2, rounded times: 1"); - let empty = Collector::default().finish(); - assert_eq!((empty.total_losses(), empty.is_lossless(), empty.summary()), (0, true, String::new())); - } - - /// Details stop at the cap. - #[test] - fn details_stop_at_the_cap() { - let mut col = Collector::default(); - for i in 0..MAX_DETAILS + 5 { - col.lose(LossCategory::Masks, format!("mask {i}")); - } - let report = col.finish(); - assert_eq!(report.count(LossCategory::Masks), MAX_DETAILS + 5); - assert_eq!(report.losses[0].details.len(), MAX_DETAILS); - } -}