pointer tests: the seam test's scales are Pixels only; unused helper and import removed
The first-pixel test of the hit-seam finding listed Cells beside the Pixels scales; a Cells node of a few px is less than a cell wide, so the test is for the fractional Pixels scales (Cells edges are pinned by a_rect_is_half_open_so_a_shared_edge_belongs_to_the_second_node). The commit that moved the pointer tests into the crate carried the wrong list; this is the corrected final spelling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
50f3ff211c
commit
bc378984c2
2 changed files with 2 additions and 7 deletions
|
|
@ -19,7 +19,7 @@ use crate::command::Commands;
|
|||
use crate::diagnostic::{Code, Diagnostic};
|
||||
use crate::layout::{Constraint, LaidTree, LayoutFrame, Leaf, Measure, Metrics, Rect, TextLayout, TextRequest, layout};
|
||||
use crate::port::{Address, Change, Entry, IdSource, Interest, Ledger, Lookup, Prefix, Record, StatePort, StateValue, SubscriptionId};
|
||||
use crate::render::{RenderCommand, RenderInput, Rendered, ScrollOffsets, Session, render};
|
||||
use crate::render::{RenderInput, Rendered, ScrollOffsets, Session, render};
|
||||
use crate::resolve::{Limits, resolve};
|
||||
use crate::theme::Theme;
|
||||
use crate::time::Timestamp;
|
||||
|
|
@ -402,8 +402,7 @@ fn seam_surface() -> SurfaceDocument {
|
|||
#[test]
|
||||
fn the_first_device_pixel_past_a_nodes_right_or_bottom_edge_is_not_the_node_at_every_scale() {
|
||||
let scales = [1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0];
|
||||
let modes = scales.map(|scale| (Metrics::Pixels, scale)).into_iter().chain([(Metrics::Cells, 1.0)]);
|
||||
for mode in modes {
|
||||
for mode in scales.map(|scale| (Metrics::Pixels, scale)) {
|
||||
let rig = Rig::new(Port::new(), &seam_surface(), mode);
|
||||
let k = device_k(&rig);
|
||||
let mut leaves = 0;
|
||||
|
|
|
|||
|
|
@ -66,10 +66,6 @@ fn up(at: (f32, f32)) -> InputEvent {
|
|||
InputEvent::PointerUp { at, button: PointerButton::Primary, modifiers: mods() }
|
||||
}
|
||||
|
||||
fn mv(at: (f32, f32)) -> InputEvent {
|
||||
InputEvent::PointerMove { at, modifiers: mods() }
|
||||
}
|
||||
|
||||
fn wheel(at: (f32, f32), delta: (f32, f32), unit: WheelUnit) -> InputEvent {
|
||||
InputEvent::Wheel { at, delta, unit, modifiers: mods() }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue