From 6c5b92e5c0e0243d54f9637e5f23a3f6641ce55b Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 23 Nov 2024 11:27:27 +0300 Subject: Add interactive_move_onto_empty_output test Tests the add_workspace_bottom() in Monitor::add_tile(). --- src/layout/mod.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 97a9f622..33d6411a 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -5723,6 +5723,36 @@ mod tests { check_ops(&ops); } + #[test] + fn interactive_move_onto_empty_output() { + let ops = [ + Op::AddOutput(1), + Op::AddWindow { + id: 0, + bbox: Rectangle::from_loc_and_size((0, 0), (100, 200)), + min_max_size: Default::default(), + }, + Op::InteractiveMoveBegin { + window: 0, + output_idx: 1, + px: 0., + py: 0., + }, + Op::AddOutput(2), + Op::InteractiveMoveUpdate { + window: 0, + dx: 1000., + dy: 0., + output_idx: 2, + px: 0., + py: 0., + }, + Op::InteractiveMoveEnd { window: 0 }, + ]; + + check_ops(&ops); + } + #[test] fn output_active_workspace_is_preserved() { let ops = [ -- cgit