T-103: assert each post-cutoff mutation independently in cutoff test

This commit is contained in:
Boki 2026-11-28 22:08:23 -05:00
parent 1a621f0ed9
commit cbf25f90b7

View file

@ -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]