use wal_core::{ component::{behavior::Behavior, Component}, virtual_dom::{VComponent, VNode}, }; use wal_rsx::rsx; include!("../utils/custom_components/custom_component_props_i32.rs"); include!("../utils/custom_components/custom_component_props_struct_with_default_and_hash.rs"); fn main() { custom_component_props_i32(); custom_component_props_struct_with_default(); custom_component_props_i32_with_key(); custom_component_props_struct_with_default_with_key(); } fn custom_component_props_i32() { let rsx = rsx! { }; assert_eq!( rsx, VNode::Component(VComponent::new::( ::Properties::default(), None )) ); } fn custom_component_props_struct_with_default() { let rsx = rsx! { }; assert_eq!( rsx, VNode::Component(VComponent::new::< CustomComponentPropsStructWithDefaultAndHash, >( ::Properties::default(), None )) ); } fn custom_component_props_i32_with_key() { let rsx = rsx! { }; assert_eq!( rsx, VNode::Component(VComponent::new::( ::Properties::default(), Some("key".to_string()) )) ); } fn custom_component_props_struct_with_default_with_key() { let rsx = rsx! { }; assert_eq!( rsx, VNode::Component(VComponent::new::< CustomComponentPropsStructWithDefaultAndHash, >( ::Properties::default(), Some("key".to_string()) )) ); }