From cbf25f90b7d466bd013cd178ab756ab51d15b583 Mon Sep 17 00:00:00 2001 From: Boki Date: Sat, 28 Nov 2026 22:08:23 -0500 Subject: [PATCH] T-103: assert each post-cutoff mutation independently in cutoff test --- .../src/curate_corporate_actions_tests.rs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/curate-etl/src/curate_corporate_actions_tests.rs b/tools/curate-etl/src/curate_corporate_actions_tests.rs index 18b10c77..ea9aca5e 100644 --- a/tools/curate-etl/src/curate_corporate_actions_tests.rs +++ b/tools/curate-etl/src/curate_corporate_actions_tests.rs @@ -1431,6 +1431,29 @@ fn point_in_time_post_cutoff_mutations_leave_on_or_before_cutoff_rows_bitwise_id assert_eq!(base_gt.len(), 3); assert_eq!(mut_gt.len(), 3); assert_ne!(base_gt, mut_gt, "post-cutoff rows must reflect post-cutoff mutations"); + + // Verify each of the three post-cutoff mutations independently by effective date and kind. + let mut_split = mut_gt + .iter() + .find(|r| r.ex_date == d_post_1 && r.kind == CorporateActionKind::Split) + .expect("mutated post-cutoff split row"); + assert_eq!(mut_split.listing_id, 111); + assert_eq!(mut_split.ratio, Some(5.0)); + + let mut_div = mut_gt + .iter() + .find(|r| r.ex_date == d_post_2 && r.kind == CorporateActionKind::Dividend) + .expect("mutated post-cutoff dividend row"); + assert_eq!(mut_div.listing_id, 111); + assert_eq!(mut_div.cash_amount, Some(1.25)); + assert_eq!(mut_div.currency.as_deref(), Some("CAD")); + + let mut_delist = mut_gt + .iter() + .find(|r| r.ex_date == d_post_2 && r.kind == CorporateActionKind::Delisting) + .expect("mutated post-cutoff delisting row"); + assert_eq!(mut_delist.listing_id, 330); + assert_eq!(mut_delist.terminal_return, Some(-1.00)); } #[test]