mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 21:00:35 +00:00
Uncomment inlay hints logic and tests (#3307)
Tests compile, but do not pass due to todo!s in the platform code, hence ignored for now. Release Notes: - N/A
This commit is contained in:
commit
7a454bed22
4 changed files with 2541 additions and 2597 deletions
|
@ -1,3 +1,7 @@
|
|||
use gpui::TestAppContext;
|
||||
use language::language_settings::{AllLanguageSettings, AllLanguageSettingsContent};
|
||||
use settings::SettingsStore;
|
||||
|
||||
// use super::*;
|
||||
// use crate::{
|
||||
// scroll::scroll_amount::ScrollAmount,
|
||||
|
@ -8152,16 +8156,16 @@
|
|||
// });
|
||||
// }
|
||||
|
||||
// pub(crate) fn update_test_language_settings(
|
||||
// cx: &mut TestAppContext,
|
||||
// f: impl Fn(&mut AllLanguageSettingsContent),
|
||||
// ) {
|
||||
// cx.update(|cx| {
|
||||
// cx.update_global::<SettingsStore, _, _>(|store, cx| {
|
||||
// store.update_user_settings::<AllLanguageSettings>(cx, f);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
pub(crate) fn update_test_language_settings(
|
||||
cx: &mut TestAppContext,
|
||||
f: impl Fn(&mut AllLanguageSettingsContent),
|
||||
) {
|
||||
cx.update(|cx| {
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings::<AllLanguageSettings>(cx, f);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// pub(crate) fn update_test_project_settings(
|
||||
// cx: &mut TestAppContext,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -182,7 +182,8 @@ impl Platform for TestPlatform {
|
|||
}
|
||||
|
||||
fn should_auto_hide_scrollbars(&self) -> bool {
|
||||
unimplemented!()
|
||||
// todo()
|
||||
true
|
||||
}
|
||||
|
||||
fn write_to_clipboard(&self, _item: crate::ClipboardItem) {
|
||||
|
|
|
@ -3448,27 +3448,27 @@ impl Workspace {
|
|||
})
|
||||
}
|
||||
|
||||
// todo!()
|
||||
// #[cfg(any(test, feature = "test-support"))]
|
||||
// pub fn test_new(project: ModelHandle<Project>, cx: &mut ViewContext<Self>) -> Self {
|
||||
// use node_runtime::FakeNodeRuntime;
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn test_new(project: Model<Project>, cx: &mut ViewContext<Self>) -> Self {
|
||||
use gpui::Context;
|
||||
use node_runtime::FakeNodeRuntime;
|
||||
|
||||
// let client = project.read(cx).client();
|
||||
// let user_store = project.read(cx).user_store();
|
||||
let client = project.read(cx).client();
|
||||
let user_store = project.read(cx).user_store();
|
||||
|
||||
// let workspace_store = cx.add_model(|cx| WorkspaceStore::new(client.clone(), cx));
|
||||
// let app_state = Arc::new(AppState {
|
||||
// languages: project.read(cx).languages().clone(),
|
||||
// workspace_store,
|
||||
// client,
|
||||
// user_store,
|
||||
// fs: project.read(cx).fs().clone(),
|
||||
// build_window_options: |_, _, _| Default::default(),
|
||||
// initialize_workspace: |_, _, _, _| Task::ready(Ok(())),
|
||||
// node_runtime: FakeNodeRuntime::new(),
|
||||
// });
|
||||
// Self::new(0, project, app_state, cx)
|
||||
// }
|
||||
let workspace_store = cx.build_model(|cx| WorkspaceStore::new(client.clone(), cx));
|
||||
let app_state = Arc::new(AppState {
|
||||
languages: project.read(cx).languages().clone(),
|
||||
workspace_store,
|
||||
client,
|
||||
user_store,
|
||||
fs: project.read(cx).fs().clone(),
|
||||
build_window_options: |_, _, _| Default::default(),
|
||||
initialize_workspace: |_, _, _, _| Task::ready(Ok(())),
|
||||
node_runtime: FakeNodeRuntime::new(),
|
||||
});
|
||||
Self::new(0, project, app_state, cx)
|
||||
}
|
||||
|
||||
// fn render_dock(&self, position: DockPosition, cx: &WindowContext) -> Option<AnyElement<Self>> {
|
||||
// let dock = match position {
|
||||
|
|
Loading…
Reference in a new issue