mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move selector matching tests and testing helpers into a #[cfg(test)] module.
This commit is contained in:
parent
146029bc06
commit
1d6f94fd96
1 changed files with 57 additions and 55 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue