test.rs

  1use super::Platform;
  2use crate::{DisplayId, Executor};
  3
  4pub struct TestPlatform;
  5
  6impl TestPlatform {
  7    pub fn new() -> Self {
  8        TestPlatform
  9    }
 10}
 11
 12// todo!("implement out what our tests needed in GPUI 1")
 13impl Platform for TestPlatform {
 14    fn executor(&self) -> Executor {
 15        unimplemented!()
 16    }
 17
 18    fn text_system(&self) -> std::sync::Arc<dyn crate::PlatformTextSystem> {
 19        unimplemented!()
 20    }
 21
 22    fn run(&self, _on_finish_launching: Box<dyn FnOnce()>) {
 23        unimplemented!()
 24    }
 25
 26    fn quit(&self) {
 27        unimplemented!()
 28    }
 29
 30    fn restart(&self) {
 31        unimplemented!()
 32    }
 33
 34    fn activate(&self, _ignoring_other_apps: bool) {
 35        unimplemented!()
 36    }
 37
 38    fn hide(&self) {
 39        unimplemented!()
 40    }
 41
 42    fn hide_other_apps(&self) {
 43        unimplemented!()
 44    }
 45
 46    fn unhide_other_apps(&self) {
 47        unimplemented!()
 48    }
 49
 50    fn displays(&self) -> Vec<std::rc::Rc<dyn crate::PlatformDisplay>> {
 51        unimplemented!()
 52    }
 53
 54    fn display(&self, _id: DisplayId) -> Option<std::rc::Rc<dyn crate::PlatformDisplay>> {
 55        unimplemented!()
 56    }
 57
 58    fn main_window(&self) -> Option<crate::AnyWindowHandle> {
 59        unimplemented!()
 60    }
 61
 62    fn open_window(
 63        &self,
 64        _handle: crate::AnyWindowHandle,
 65        _options: crate::WindowOptions,
 66    ) -> Box<dyn crate::PlatformWindow> {
 67        unimplemented!()
 68    }
 69
 70    fn set_display_link_output_callback(
 71        &self,
 72        _display_id: DisplayId,
 73        _callback: Box<dyn FnMut(&crate::VideoTimestamp, &crate::VideoTimestamp)>,
 74    ) {
 75        unimplemented!()
 76    }
 77
 78    fn start_display_link(&self, _display_id: DisplayId) {
 79        unimplemented!()
 80    }
 81
 82    fn stop_display_link(&self, _display_id: DisplayId) {
 83        unimplemented!()
 84    }
 85
 86    fn open_url(&self, _url: &str) {
 87        unimplemented!()
 88    }
 89
 90    fn on_open_urls(&self, _callback: Box<dyn FnMut(Vec<String>)>) {
 91        unimplemented!()
 92    }
 93
 94    fn prompt_for_paths(
 95        &self,
 96        _options: crate::PathPromptOptions,
 97    ) -> futures::channel::oneshot::Receiver<Option<Vec<std::path::PathBuf>>> {
 98        unimplemented!()
 99    }
100
101    fn prompt_for_new_path(
102        &self,
103        _directory: &std::path::Path,
104    ) -> futures::channel::oneshot::Receiver<Option<std::path::PathBuf>> {
105        unimplemented!()
106    }
107
108    fn reveal_path(&self, _path: &std::path::Path) {
109        unimplemented!()
110    }
111
112    fn on_become_active(&self, _callback: Box<dyn FnMut()>) {
113        unimplemented!()
114    }
115
116    fn on_resign_active(&self, _callback: Box<dyn FnMut()>) {
117        unimplemented!()
118    }
119
120    fn on_quit(&self, _callback: Box<dyn FnMut()>) {
121        unimplemented!()
122    }
123
124    fn on_reopen(&self, _callback: Box<dyn FnMut()>) {
125        unimplemented!()
126    }
127
128    fn on_event(&self, _callback: Box<dyn FnMut(crate::InputEvent) -> bool>) {
129        unimplemented!()
130    }
131
132    fn os_name(&self) -> &'static str {
133        unimplemented!()
134    }
135
136    fn os_version(&self) -> anyhow::Result<crate::SemanticVersion> {
137        unimplemented!()
138    }
139
140    fn app_version(&self) -> anyhow::Result<crate::SemanticVersion> {
141        unimplemented!()
142    }
143
144    fn app_path(&self) -> anyhow::Result<std::path::PathBuf> {
145        unimplemented!()
146    }
147
148    fn local_timezone(&self) -> time::UtcOffset {
149        unimplemented!()
150    }
151
152    fn path_for_auxiliary_executable(&self, _name: &str) -> anyhow::Result<std::path::PathBuf> {
153        unimplemented!()
154    }
155
156    fn set_cursor_style(&self, _style: crate::CursorStyle) {
157        unimplemented!()
158    }
159
160    fn should_auto_hide_scrollbars(&self) -> bool {
161        unimplemented!()
162    }
163
164    fn write_to_clipboard(&self, _item: crate::ClipboardItem) {
165        unimplemented!()
166    }
167
168    fn read_from_clipboard(&self) -> Option<crate::ClipboardItem> {
169        unimplemented!()
170    }
171
172    fn write_credentials(
173        &self,
174        _url: &str,
175        _username: &str,
176        _password: &[u8],
177    ) -> anyhow::Result<()> {
178        unimplemented!()
179    }
180
181    fn read_credentials(&self, _url: &str) -> anyhow::Result<Option<(String, Vec<u8>)>> {
182        unimplemented!()
183    }
184
185    fn delete_credentials(&self, _url: &str) -> anyhow::Result<()> {
186        unimplemented!()
187    }
188}