From a9dc46c950693bf20edf213264fd2b324c3ee426 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 25 Oct 2022 17:09:26 -0700 Subject: [PATCH] added stubs for more tests --- crates/db/src/workspace.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/db/src/workspace.rs b/crates/db/src/workspace.rs index e2c4d6319c2b82380777a313c42df294bc9445bd..68008a2795d6da48b67c590daea6986129be2e89 100644 --- a/crates/db/src/workspace.rs +++ b/crates/db/src/workspace.rs @@ -49,7 +49,8 @@ impl Db { &self, worktree_roots: &[Arc], ) -> SerializedWorkspace { - // Find the workspace id which is uniquely identified by this set of paths return it if found + // Find the workspace id which is uniquely identified by this set of paths + // return it if found let mut workspace_id = self.workspace_id(worktree_roots); if workspace_id.is_none() && worktree_roots.len() == 0 { workspace_id = self.last_workspace_id(); @@ -388,6 +389,12 @@ mod tests { use super::WorkspaceId; + #[test] + fn test_empty_worktrees() { + // TODO determine update_worktree_roots(), workspace_id(), recent_workspaces() + // semantics for this case + } + #[test] fn test_more_workspace_ids() { let data = &[