use rdxl::{xhtml,xtype,xrender,xtextrender}; fn bs(s: String) -> String { s.split_whitespace().collect::>().join(" ") } xtype!(); xtype!( ); xtype!(); xrender!(MyList, ); xrender!(MyItem, my_bool: {{ self.my_bool }}); xrender!(MyOtherItem, my_char: {{ self.my_char }}); xtextrender!(MyTextType, a: 1); #[test] fn simple_class1() { assert_eq!( bs(xhtml!()), "my_bool: true".to_string() ); } #[test] fn simple_class2() { assert_eq!( bs(xhtml!()), "my_char: c".to_string() ); } #[test] fn text_class1() { assert_eq!( xhtml!(), "a:1".to_string() ); } #[test] fn complex_class1(){ assert_eq!( bs(xhtml!( )), "".to_string() ); }