Move selector matching tests and testing helpers into a #[cfg(test)] module.

This commit is contained in:
Simon Sapin 2014-01-08 13:50:23 +00:00
parent 146029bc06
commit 1d6f94fd96

View file

@ -710,6 +710,8 @@ fn match_attribute<E:TElement,
}
#[cfg(test)]
mod tests {
/// Helper method to get some Rules from selector strings.
/// Each sublist of the result contains the Rules for one StyleRule.
fn get_mock_rules(css_selectors: &[&str]) -> ~[~[Rule]] {
@ -772,4 +774,4 @@ fn test_insert(){
assert_eq!(0, selector_map.class_hash.find(&~"intro").unwrap()[0].index);
assert!(selector_map.class_hash.find(&~"foo").is_none());
}
}