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 display_linker(&self) -> std::sync::Arc<dyn crate::PlatformDisplayLinker> {
 19        unimplemented!()
 20    }
 21
 22    fn text_system(&self) -> std::sync::Arc<dyn crate::PlatformTextSystem> {
 23        unimplemented!()
 24    }
 25
 26    fn run(&self, _on_finish_launching: Box<dyn FnOnce()>) {
 27        unimplemented!()
 28    }
 29
 30    fn quit(&self) {
 31        unimplemented!()
 32    }
 33
 34    fn restart(&self) {
 35        unimplemented!()
 36    }
 37
 38    fn activate(&self, _ignoring_other_apps: bool) {
 39        unimplemented!()
 40    }
 41
 42    fn hide(&self) {
 43        unimplemented!()
 44    }
 45
 46    fn hide_other_apps(&self) {
 47        unimplemented!()
 48    }
 49
 50    fn unhide_other_apps(&self) {
 51        unimplemented!()
 52    }
 53
 54    fn displays(&self) -> Vec<std::rc::Rc<dyn crate::PlatformDisplay>> {
 55        unimplemented!()
 56    }
 57
 58    fn display(&self, _id: DisplayId) -> Option<std::rc::Rc<dyn crate::PlatformDisplay>> {
 59        unimplemented!()
 60    }
 61
 62    fn main_window(&self) -> Option<crate::AnyWindowHandle> {
 63        unimplemented!()
 64    }
 65
 66    fn open_window(
 67        &self,
 68        _handle: crate::AnyWindowHandle,
 69        _options: crate::WindowOptions,
 70    ) -> Box<dyn crate::PlatformWindow> {
 71        unimplemented!()
 72    }
 73
 74    fn open_url(&self, _url: &str) {
 75        unimplemented!()
 76    }
 77
 78    fn on_open_urls(&self, _callback: Box<dyn FnMut(Vec<String>)>) {
 79        unimplemented!()
 80    }
 81
 82    fn prompt_for_paths(
 83        &self,
 84        _options: crate::PathPromptOptions,
 85    ) -> futures::channel::oneshot::Receiver<Option<Vec<std::path::PathBuf>>> {
 86        unimplemented!()
 87    }
 88
 89    fn prompt_for_new_path(
 90        &self,
 91        _directory: &std::path::Path,
 92    ) -> futures::channel::oneshot::Receiver<Option<std::path::PathBuf>> {
 93        unimplemented!()
 94    }
 95
 96    fn reveal_path(&self, _path: &std::path::Path) {
 97        unimplemented!()
 98    }
 99
100    fn on_become_active(&self, _callback: Box<dyn FnMut()>) {
101        unimplemented!()
102    }
103
104    fn on_resign_active(&self, _callback: Box<dyn FnMut()>) {
105        unimplemented!()
106    }
107
108    fn on_quit(&self, _callback: Box<dyn FnMut()>) {
109        unimplemented!()
110    }
111
112    fn on_reopen(&self, _callback: Box<dyn FnMut()>) {
113        unimplemented!()
114    }
115
116    fn on_event(&self, _callback: Box<dyn FnMut(crate::Event) -> bool>) {
117        unimplemented!()
118    }
119
120    fn os_name(&self) -> &'static str {
121        unimplemented!()
122    }
123
124    fn os_version(&self) -> anyhow::Result<crate::SemanticVersion> {
125        unimplemented!()
126    }
127
128    fn app_version(&self) -> anyhow::Result<crate::SemanticVersion> {
129        unimplemented!()
130    }
131
132    fn app_path(&self) -> anyhow::Result<std::path::PathBuf> {
133        unimplemented!()
134    }
135
136    fn local_timezone(&self) -> time::UtcOffset {
137        unimplemented!()
138    }
139
140    fn path_for_auxiliary_executable(&self, _name: &str) -> anyhow::Result<std::path::PathBuf> {
141        unimplemented!()
142    }
143
144    fn set_cursor_style(&self, _style: crate::CursorStyle) {
145        unimplemented!()
146    }
147
148    fn should_auto_hide_scrollbars(&self) -> bool {
149        unimplemented!()
150    }
151
152    fn write_to_clipboard(&self, _item: crate::ClipboardItem) {
153        unimplemented!()
154    }
155
156    fn read_from_clipboard(&self) -> Option<crate::ClipboardItem> {
157        unimplemented!()
158    }
159
160    fn write_credentials(
161        &self,
162        _url: &str,
163        _username: &str,
164        _password: &[u8],
165    ) -> anyhow::Result<()> {
166        unimplemented!()
167    }
168
169    fn read_credentials(&self, _url: &str) -> anyhow::Result<Option<(String, Vec<u8>)>> {
170        unimplemented!()
171    }
172
173    fn delete_credentials(&self, _url: &str) -> anyhow::Result<()> {
174        unimplemented!()
175    }
176}