()
| 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() { |
nothing calls this directly
no test coverage detected