mrml/mj_attributes_class/
print.rs1use crate::prelude::print::PrintableAttributes;
2
3impl PrintableAttributes for super::MjAttributesClassAttributes {
4 fn print<P: crate::prelude::print::Printer>(&self, printer: &mut P) -> std::fmt::Result {
5 printer.push_attribute("name", self.name.as_str())?;
6 self.others.print(printer)
7 }
8}
9
10#[cfg(test)]
11mod tests {
12 use crate::prelude::print::Printable;
13
14 #[test]
15 fn empty() {
16 let item = crate::mj_attributes_all::MjAttributesAll::default();
17 assert_eq!("<mj-all />", item.print_dense().unwrap());
18 }
19}