Uncomment all inlay hint cache code and tests

This commit is contained in:
Kirill Bulatov 2023-11-13 12:10:34 +02:00
parent 81cc6e84b7
commit a9c17e7407
3 changed files with 2588 additions and 2596 deletions

View file

@ -1,3 +1,7 @@
use gpui::TestAppContext;
use language::language_settings::{AllLanguageSettings, AllLanguageSettingsContent};
use settings::SettingsStore;
// use super::*; // use super::*;
// use crate::{ // use crate::{
// scroll::scroll_amount::ScrollAmount, // scroll::scroll_amount::ScrollAmount,
@ -8152,16 +8156,16 @@
// }); // });
// } // }
// pub(crate) fn update_test_language_settings( pub(crate) fn update_test_language_settings(
// cx: &mut TestAppContext, cx: &mut TestAppContext,
// f: impl Fn(&mut AllLanguageSettingsContent), f: impl Fn(&mut AllLanguageSettingsContent),
// ) { ) {
// cx.update(|cx| { cx.update(|cx| {
// cx.update_global::<SettingsStore, _, _>(|store, cx| { cx.update_global::<SettingsStore, _>(|store, cx| {
// store.update_user_settings::<AllLanguageSettings>(cx, f); store.update_user_settings::<AllLanguageSettings>(cx, f);
// }); });
// }); });
// } }
// pub(crate) fn update_test_project_settings( // pub(crate) fn update_test_project_settings(
// cx: &mut TestAppContext, // cx: &mut TestAppContext,

File diff suppressed because it is too large Load diff

View file

@ -3448,27 +3448,27 @@ impl Workspace {
}) })
} }
// todo!() #[cfg(any(test, feature = "test-support"))]
// #[cfg(any(test, feature = "test-support"))] pub fn test_new(project: Model<Project>, cx: &mut ViewContext<Self>) -> Self {
// pub fn test_new(project: ModelHandle<Project>, cx: &mut ViewContext<Self>) -> Self { use gpui::Context;
// use node_runtime::FakeNodeRuntime; use node_runtime::FakeNodeRuntime;
// let client = project.read(cx).client(); let client = project.read(cx).client();
// let user_store = project.read(cx).user_store(); let user_store = project.read(cx).user_store();
// let workspace_store = cx.add_model(|cx| WorkspaceStore::new(client.clone(), cx)); let workspace_store = cx.build_model(|cx| WorkspaceStore::new(client.clone(), cx));
// let app_state = Arc::new(AppState { let app_state = Arc::new(AppState {
// languages: project.read(cx).languages().clone(), languages: project.read(cx).languages().clone(),
// workspace_store, workspace_store,
// client, client,
// user_store, user_store,
// fs: project.read(cx).fs().clone(), fs: project.read(cx).fs().clone(),
// build_window_options: |_, _, _| Default::default(), build_window_options: |_, _, _| Default::default(),
// initialize_workspace: |_, _, _, _| Task::ready(Ok(())), initialize_workspace: |_, _, _, _| Task::ready(Ok(())),
// node_runtime: FakeNodeRuntime::new(), node_runtime: FakeNodeRuntime::new(),
// }); });
// Self::new(0, project, app_state, cx) Self::new(0, project, app_state, cx)
// } }
// fn render_dock(&self, position: DockPosition, cx: &WindowContext) -> Option<AnyElement<Self>> { // fn render_dock(&self, position: DockPosition, cx: &WindowContext) -> Option<AnyElement<Self>> {
// let dock = match position { // let dock = match position {