git.lucas.co / cce-cloud
cloud storage client
git clone https://git.lucas.co/cce-cloud.git

commit220fdfdcb93b63685ff1e915a41cc3b668ec51d6
parent1f372a5c37
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-09 00:54
test: insert the hover test's layout

cce-ui's registry owns its widgets (owning registry, phase 5); its raw-pointer tree accessors are crate-private.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/main.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index c9fb269..506b43f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -5092,13 +5092,13 @@ mod tests {
         // button lit up on the first stationary wiggle).
         let (x1, y1) = (layout.widgets[1].x, layout.widgets[1].y);
         let root = layout.id();
-        ctx.register_host(&mut layout);
+        let layout = ctx.insert(layout);
         let mv = |x: f32, y: f32| cce_ui::widget::Event::PointerMove { x, y, local_x: x, local_y: y };
         ctx.propagate_event(&mv(x1 + 10.0, y1 + 5.0), root);
         ctx.propagate_event(&mv(x1 + 12.0, y1 + 5.0), root);
-        assert!(!hovered(&layout, 0), "unconsumed move must not hover-broadcast");
-        assert!(hovered(&layout, 1));
-        assert!(!hovered(&layout, 2), "unconsumed move must not hover-broadcast");
+        assert!(!hovered(&ctx[layout], 0), "unconsumed move must not hover-broadcast");
+        assert!(hovered(&ctx[layout], 1));
+        assert!(!hovered(&ctx[layout], 2), "unconsumed move must not hover-broadcast");
     }
 
     #[test]