Add a compile test for the element derive
This commit is contained in:
parent
ffffbbea1f
commit
7970406694
5 changed files with 27 additions and 2 deletions
14
crates/gpui_macros/tests/test.rs
Normal file
14
crates/gpui_macros/tests/test.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
use gpui::{elements::RenderElement, View, ViewContext};
|
||||
use gpui_macros::Element;
|
||||
|
||||
#[test]
|
||||
fn test_derive_render_element() {
|
||||
#[derive(Element)]
|
||||
struct TestElement {}
|
||||
|
||||
impl RenderElement for TestElement {
|
||||
fn render<V: View>(&mut self, _: &mut V, _: &mut ViewContext<V>) -> gpui::AnyElement<V> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue