test(data): compare compact names by value and allocation class

This commit is contained in:
boris
2026-09-13 09:57:46 +08:00
committed by boris
parent 0ff90c4329
commit fe05384f80
2 changed files with 10 additions and 12 deletions
+2 -4
View File
@@ -6470,10 +6470,8 @@ mod tests {
extra_factors: From::from([(Cow::Borrowed("amount"), 10.0)]),
}])
.expect("normalize clean factor snapshot");
assert!(matches!(
clean[0].extra_factors.keys().next(),
Some(Cow::Borrowed("amount"))
));
assert_eq!(clean[0].extra_factors.keys().next().map(CompactString::as_str), Some("amount"));
assert!(!clean[0].extra_factors.keys().next().unwrap().is_heap_allocated());
let dirty = normalize_factor_snapshots(vec![DailyFactorSnapshot {
date,