Format saved allocation readability regressions

This commit is contained in:
2026-09-12 04:18:42 -07:00
parent 94b5eecb1c
commit d9b3f0dc91
2 changed files with 75 additions and 22 deletions
+29 -8
View File
@@ -1039,19 +1039,31 @@ fn frozen_performer_label_refuses_overlapping_work_header_and_allows_nearby_exac
// The actual frozen renderer bounds for Receiver at (100, 100).
context.target.as_mut().unwrap().label = Rect {
position: xy(110., 131.),
size: Size { width: 88., height: 22. },
size: Size {
width: 88.,
height: 22.,
},
};
let label = context.target.unwrap().label;
let counterexample = Rect {
position: xy(120., 110.),
size: Size { width: 224., height: 62. },
size: Size {
width: 224.,
height: 62.,
},
};
assert!(context.viewport.contains(label));
assert!(context.viewport.contains(counterexample));
assert!(label.contains(Rect {
position: xy(134., 145.),
size: Size { width: 1., height: 1. },
}), "the formerly admitted work name begins underneath the label");
assert!(
label.contains(Rect {
position: xy(134., 145.),
size: Size {
width: 1.,
height: 1.
},
}),
"the formerly admitted work name begins underneath the label"
);
let before = plan.project().clone();
assert!(matches!(
place(&plan, xy(120., 105.), context),
@@ -1078,7 +1090,10 @@ fn frozen_label_readability_allows_touching_edges_but_refuses_positive_area_over
let mut context = presentation(&f.p, f.d, Some(f.a));
context.target.as_mut().unwrap().label = Rect {
position: xy(110., 131.),
size: Size { width: 90., height: 19. },
size: Size {
width: 90.,
height: 19.,
},
};
for (position, allowed) in [
(xy(190., 110.), false),
@@ -1102,7 +1117,13 @@ fn same_performer_readability_preserves_snapped_noop_and_allocation_identity() {
let mut f = fixture(layer);
let a = f.a;
allocation(&mut f, a);
f.p.diagrams.get_mut(&f.d).unwrap().nodes.get_mut(&f.n).unwrap().position = xy(150., 200.);
f.p.diagrams
.get_mut(&f.d)
.unwrap()
.nodes
.get_mut(&f.n)
.unwrap()
.position = xy(150., 200.);
let plan = semantic(&f, Destination::Performer(f.a));
let context = presentation(&f.p, f.d, Some(f.a));
assert_eq!(plan.project(), &f.p);