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

Function are_parsed_strs_equal

src/interface.rs:662–677  ·  view source on GitHub ↗
(test: &str, target: &str)

Source from the content-addressed store, hash-verified

660 use super::*;
661
662 fn are_parsed_strs_equal(test: &str, target: &str) -> bool {
663 let target_package = &parser::parse(target).expect("Failed to parse input");
664 let target_doc = target_package.as_document();
665 trim_doc(&target_doc);
666 debug!("target:\n{}", mml_to_string(&get_element(&target_package)));
667
668 let test_package = &parser::parse(test).expect("Failed to parse input");
669 let test_doc = test_package.as_document();
670 trim_doc(&test_doc);
671 debug!("test:\n{}", mml_to_string(&get_element(&test_package)));
672
673 match is_same_doc(&test_doc, &target_doc) {
674 Ok(_) => return true,
675 Err(e) => panic!("{}", e),
676 }
677 }
678
679 #[test]
680 fn trim_same() {

Callers

nothing calls this directly

Calls 2

trim_docFunction · 0.85
is_same_docFunction · 0.85

Tested by

no test coverage detected