New document: keep the overlap check for the two-row Bleed layout

The two-row branch of the small-window test checked only where each column
starts, so Top could reach into Bottom and Left into Right and still pass.
This commit is contained in:
dotCooCoo committed 2026-11-30 22:10:15 -08:00
1 parent 0e480bfde0
commit bbf0e146ce
1 file changed
+1
@@ -1684,6 +1684,7 @@ mod tests {
// A column wide enough holds the four fields in one row; a narrower one, in two rows of two.
let one_row = [bottom, left, right].iter().all(|f| f.y0 == top.y0) && top.x1 <= bottom.x0 && bottom.x1 <= left.x0 && left.x1 <= right.x0;
let two_rows = top.y0 == bottom.y0 && left.y0 == right.y0 && top.y1 <= left.y0 && top.x0 == left.x0 && bottom.x0 == right.x0;
let two_rows = two_rows && top.x1 <= bottom.x0 && left.x1 <= right.x0;
assert!(one_row || two_rows, "{at}: the Bleed fields stand in one row or two: {top:?} {bottom:?} {left:?} {right:?}");
let link = node(&nodes, "Make all settings the same", Role::Button);
assert!(right.x1 <= link.x0 && link.x1 <= dialog.x1, "{at}: the link button {link:?} follows Right {right:?} inside {dialog:?}");