1use gpui::{actions, impl_actions};
2use gpui_macros::register_action;
3use serde_derive::Deserialize;
4
5#[test]
6fn test_action_macros() {
7 actions!(test, [TestAction]);
8
9 #[derive(PartialEq, Clone, Deserialize)]
10 struct AnotherTestAction;
11
12 impl_actions!(test, [AnotherTestAction]);
13
14 #[derive(PartialEq, Clone, gpui::private::serde_derive::Deserialize)]
15 struct RegisterableAction {}
16
17 register_action!(RegisterableAction);
18
19 impl gpui::Action for RegisterableAction {
20 fn boxed_clone(&self) -> Box<dyn gpui::Action> {
21 unimplemented!()
22 }
23
24 fn as_any(&self) -> &dyn std::any::Any {
25 unimplemented!()
26 }
27
28 fn partial_eq(&self, _action: &dyn gpui::Action) -> bool {
29 unimplemented!()
30 }
31
32 fn name(&self) -> &str {
33 unimplemented!()
34 }
35
36 fn debug_name() -> &'static str
37 where
38 Self: Sized,
39 {
40 unimplemented!()
41 }
42
43 fn build(_value: serde_json::Value) -> anyhow::Result<Box<dyn gpui::Action>>
44 where
45 Self: Sized,
46 {
47 unimplemented!()
48 }
49 }
50}