From e3e761fe3216a08282d4bee8fbceb03706b58533 Mon Sep 17 00:00:00 2001 From: gorkematlyn Date: Wed, 21 Oct 2026 09:22:17 +0000 Subject: [PATCH] UI.7: doc comments on the workspace tests Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KcHisW1vt6pkVPYbzL6Cpg --- crates/ui-egui/src/workspaces.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/src/workspaces.rs b/crates/ui-egui/src/workspaces.rs index 5606bd94b..1d9fa4d19 100644 --- a/crates/ui-egui/src/workspaces.rs +++ b/crates/ui-egui/src/workspaces.rs @@ -551,6 +551,7 @@ mod tests { assert_eq!(back.workspace, "Mine"); } + /// Changes made in a workspace come back after switching away and back, and after a restart, until Reset. #[test] fn a_workspace_keeps_its_changes_across_switches_until_reset() { let mut ui = UiState::default(); @@ -592,6 +593,7 @@ mod tests { assert!(ui.workspace_changes.iter().all(|w| w.name != "G")); } + /// Deleting the current workspace shows Essentials as it was left, not the deleted one's layout. #[test] fn deleting_the_current_workspace_switches_to_essentials_without_leaking_its_layout() { let mut ui = UiState::default(); @@ -605,6 +607,7 @@ mod tests { assert!(!ui.control_bar, "Essentials didn't remember the deleted workspace's layout"); } + /// With 64 layouts remembered, the oldest goes and the one just left is kept. #[test] fn a_full_list_of_remembered_layouts_drops_the_oldest_not_the_newest() { let mut ui = UiState::default(); @@ -623,6 +626,7 @@ mod tests { assert!(ui.control_bar, "the layout just left is kept"); } + /// Saving a workspace takes the current layout into it, which then starts with no changes. #[test] fn saving_a_workspace_moves_the_changes_into_it() { let mut ui = UiState { control_bar: true, ..Default::default() };