Layers: compare frame paths in the duplicate thread-order test

Both text frames in the test start with an identity transform, so comparing transforms passed even when the copied thread was reversed. The assertion now compares the frames' paths, which differ.
This commit is contained in:
dotCooCoo committed 2026-11-12 07:42:44 -08:00
1 parent 92e03d0965
commit 3ff65a381a
1 file changed
+2 -2
+2 -2
View File
@@ -538,8 +538,8 @@ mod layer_tests {
assert_eq!(st.text, orig.text, "the copy holds the whole text");
// Thread order as in the original (a's copy first, though b's copy was made first), without c.
let pos = |id: designcraft_doc::ItemId| d.find(id).map(|l| l.path.clone());
let order: Vec<_> = st.frames.iter().map(|f| d.item(*f).unwrap().xf).collect();
let want: Vec<_> = [a, b].iter().map(|f| d.item(designcraft_doc::ItemId(*f)).unwrap().xf).collect();
let order: Vec<_> = st.frames.iter().map(|f| d.item(*f).unwrap().path.clone()).collect();
let want: Vec<_> = [a, b].iter().map(|f| d.item(designcraft_doc::ItemId(*f)).unwrap().path.clone()).collect();
assert_eq!(order, want);
assert!(st.frames.iter().all(|f| pos(*f).is_some()));
}