use rdxl::{xhtml,xtype,xrender}; xtype!(); xtype!(); xtype!(); impl MyField { fn to_field2(&self) -> MyField2 { MyField2 { x: format!("{}",self.x), children:vec![] } } } xrender!(MyType,
field1: {{self.field1.x}}
field2: {{self.field2.x}}
); #[test] fn class_complex_some_spaces1(){ assert_eq!( xhtml!( field2= />), "
field1: 1
field2: 2
".to_string() ); } #[test] fn class_complex_some_spaces2(){ assert_eq!( xhtml!(), "
field1: 3
field2: 4
".to_string() ); }