MCPcopy Create free account
hub / github.com/daisy/MathCAT / trim_differs

Function trim_differs

src/interface.rs:734–750  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

732
733 #[test]
734 fn trim_differs() {
735 let whitespace_str = "<math> <mrow ><mo>-</mo><mi> a </mi></mrow ></math>";
736 let different_str = "<math> <mrow ><mo>-</mo><mi> b </mi></mrow ></math>";
737
738 // need to manually do this since failure shouldn't be a panic
739 let package1 = &parser::parse(whitespace_str).expect("Failed to parse input");
740 let doc1 = package1.as_document();
741 trim_doc(&doc1);
742 debug!("doc1:\n{}", mml_to_string(&get_element(&package1)));
743
744 let package2 = parser::parse(different_str).expect("Failed to parse input");
745 let doc2 = package2.as_document();
746 trim_doc(&doc2);
747 debug!("doc2:\n{}", mml_to_string(&get_element(&package2)));
748
749 assert!(is_same_doc(&doc1, &doc2).is_err());
750 }
751
752 #[test]
753 fn test_entities() {

Callers

nothing calls this directly

Calls 1

trim_docFunction · 0.85

Tested by

no test coverage detected