From 3ff65a381a308267eecc14a8f7ba36c476f2c522 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 12 Nov 2026 07:42:44 -0800 Subject: [PATCH] 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. --- crates/engine/src/cmd/layout/layers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/layout/layers.rs b/crates/engine/src/cmd/layout/layers.rs index a527df660..b696653b4 100644 --- a/crates/engine/src/cmd/layout/layers.rs +++ b/crates/engine/src/cmd/layout/layers.rs @@ -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())); }