From bc378984c21b469cb6ea53659ebb21d137795659 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 29 Nov 2026 05:45:37 +0100 Subject: [PATCH] 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 --- crates/thing-core/src/input/tests.rs | 5 ++--- crates/thing-core/tests/input.rs | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/thing-core/src/input/tests.rs b/crates/thing-core/src/input/tests.rs index 21ab1ca..a70a023 100644 --- a/crates/thing-core/src/input/tests.rs +++ b/crates/thing-core/src/input/tests.rs @@ -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; diff --git a/crates/thing-core/tests/input.rs b/crates/thing-core/tests/input.rs index 58d0dfd..8d61993 100644 --- a/crates/thing-core/tests/input.rs +++ b/crates/thing-core/tests/input.rs @@ -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() } }