} #[test] fn array() { assert_eq!( MetadataHtml(&Value::Array(vec![ Value::Null, Value::Null, Value::Text("hello".to_string()) ])) .to_string(), "<ul><li>null</li><li>null</li><li>hello</li></ul>" ) } #[test] fn map() { assert_eq!( MetadataHtml(&Value::Map( vec![ (Value::Text("b".to_string()), Value::Null), ( Value::Text("a".to_string()), Value::Text("hello".to_string()) ) ] .into_iter() .collect() )) .to_string(), "<dl><dt>b</dt><dd>null</dd><dt>a</dt><dd>hello</dd></dl>" ); assert_eq!( MetadataHtml(&Value::Map( vec![(Value::Text("<".to_string()), Value::Null),] .into_iter() .collect() )) .to_string(), "<dl><dt>&lt;</dt><dd>null</dd></dl>" ); } }
Inscription number 44,982,590
Genesis block 819,059
File type text
File size 906 b
Creation date Nov 30,2023 1:34 am