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 {
75
75
76
76
#[ cfg( test) ]
77
77
mod 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
-
88
78
#[ test]
89
79
fn small_html ( ) {
90
80
let ( head, body, class) = super :: extract_head_and_body (
@@ -102,8 +92,8 @@ mod test {
102
92
let expected_head = std:: fs:: read_to_string ( "tests/regex/head.html" ) . unwrap ( ) ;
103
93
let expected_body = std:: fs:: read_to_string ( "tests/regex/body.html" ) . unwrap ( ) ;
104
94
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 ( ) ) ;
107
97
assert_eq ! ( class, "rustdoc struct" ) ;
108
98
}
109
99
}
You can’t perform that action at this time.
0 commit comments