fix(gui-1b): B6's inertness row asserted neither its surface nor silence
Two defects in the horizontal row, both of the same kind: it asserted
the absence of one effect and called that inertness.
It never checked what its probes classified as. The other two B6 rows
pin their targets; this one did not, so a probe that drifted onto panel
chrome --- horizontally inert for an entirely different reason, and
banking nowhere at all --- would have satisfied every assertion without
touching B6. Both targets are now asserted exactly. Verified by moving
the minimap probe off the band: all three rows fail at their setup.
And it discarded both Steps, leaving an unchanged code_scroll_left as
the whole of "inert". A notch that scrolled vertically, or put an event
on the wire, would have passed. The minimap leg now asserts an empty
transcript beside the unchanged origin. Verified by rerouting the
minimap's horizontal leg to scroll_by_lines(1): the assertion fires,
reporting [Scroll { top: 1 }].
The contrast leg keeps the left edge as its discriminator, and now says
why: a horizontal document scroll is local and silent, so its transcript
is empty too. Only code_scroll_left separates the two surfaces, and a
reader who assumed otherwise would draw the wrong conclusion from the
row's shape.
Gates: fmt; clippy --workspace --all-targets -D warnings; pmacs-gpu 312;
git diff --check.
This commit is contained in:
parent
2dccc2b69c
commit
f441d3dc55
|
|
@ -5189,8 +5189,27 @@ mod input_routing_tests {
|
|||
.code_scroll_left
|
||||
};
|
||||
move_pointer(&mut h, minimap);
|
||||
assert_eq!(
|
||||
h.app.classify_wheel_target(minimap.0, minimap.1),
|
||||
WheelTarget::Minimap,
|
||||
"setup: the probe must be the minimap. Several other targets \
|
||||
are horizontally inert for their own reasons — panel chrome \
|
||||
banks nowhere at all — so a probe that drifted onto one \
|
||||
would satisfy every assertion below without testing B6"
|
||||
);
|
||||
let before = left_of(&h);
|
||||
h.feed(&wheel(1.0, 0.0));
|
||||
let step = h.feed(&wheel(1.0, 0.0));
|
||||
// **Inert, not merely unmoved.** An unchanged left edge alone
|
||||
// would still pass if the notch had produced a local effect or
|
||||
// put an event on the wire, so the transcript is asserted empty
|
||||
// beside it.
|
||||
assert!(
|
||||
step.local.is_empty() && step.outbound.is_empty(),
|
||||
"a horizontal notch over the minimap must do nothing at all: \
|
||||
{:?} {:?}",
|
||||
step.local,
|
||||
step.outbound
|
||||
);
|
||||
// Unchanged, not merely small: any real horizontal scroll is at
|
||||
// least one character advance, which is orders above this.
|
||||
assert!(
|
||||
|
|
@ -5202,7 +5221,17 @@ mod input_routing_tests {
|
|||
|
||||
// The same event over text, to show the delta was real and the
|
||||
// row is not asserting that horizontal wheels do nothing at all.
|
||||
//
|
||||
// Its discriminator is the left edge, NOT the transcript: a
|
||||
// horizontal document scroll is local and silent, so this leg's
|
||||
// transcript is empty too. Only `code_scroll_left` separates the
|
||||
// two surfaces.
|
||||
move_pointer(&mut h, document);
|
||||
assert_eq!(
|
||||
h.app.classify_wheel_target(document.0, document.1),
|
||||
WheelTarget::Document,
|
||||
"setup: the contrast probe must be document text"
|
||||
);
|
||||
h.feed(&wheel(1.0, 0.0));
|
||||
assert!(
|
||||
left_of(&h) > before,
|
||||
|
|
|
|||
Loading…
Reference in New Issue