diff --git a/crates/ui-contract/src/primitives/text.rs b/crates/ui-contract/src/primitives/text.rs index f80147731..5dda5c2f7 100644 --- a/crates/ui-contract/src/primitives/text.rs +++ b/crates/ui-contract/src/primitives/text.rs @@ -939,7 +939,12 @@ mod memo_tests { assert!(Arc::ptr_eq(&first.galley, &second.galley)); assert!(first.runs.value.get().is_none()); assert!(first.full.value.get().is_none()); + let mut cold = first.clone(); + cold.full.push('?'); + cold.runs.clear(); + assert!(cold.runs().is_empty()); assert_eq!(first.full(), "a label long enough to elide"); + assert_ne!(cold.full(), first.full()); assert!(second.full.value.get().is_some()); let _ = first.runs(); assert!(second.runs.value.get().is_some());