File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -75,16 +75,6 @@ fn extract_class(node: &Handle) -> String {
7575
7676#[ cfg( test) ]
7777mod test {
78- use super :: * ;
79-
80- fn round_trip ( a : & str ) -> String {
81- let parser = parse_document ( RcDom :: default ( ) , ParseOpts :: default ( ) ) ;
82- stringify ( parser. one ( a) . document )
83- }
84- fn mostly_equal ( a : & str , b : & str ) -> bool {
85- round_trip ( a. trim ( ) ) . trim ( ) == round_trip ( b. trim ( ) ) . trim ( )
86- }
87-
8878 #[ test]
8979 fn small_html ( ) {
9080 let ( head, body, class) = super :: extract_head_and_body (
@@ -102,8 +92,8 @@ mod test {
10292 let expected_head = std:: fs:: read_to_string ( "tests/regex/head.html" ) . unwrap ( ) ;
10393 let expected_body = std:: fs:: read_to_string ( "tests/regex/body.html" ) . unwrap ( ) ;
10494 let ( head, body, class) = super :: extract_head_and_body ( & original) . unwrap ( ) ;
105- assert ! ( mostly_equal ( & head, & expected_head) ) ;
106- assert ! ( mostly_equal ( & body, & expected_body) ) ;
95+ assert_eq ! ( head, expected_head. trim ( ) ) ;
96+ assert_eq ! ( & body, & expected_body. trim ( ) ) ;
10797 assert_eq ! ( class, "rustdoc struct" ) ;
10898 }
10999}
You can’t perform that action at this time.
0 commit comments