mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix up and run unit tests.
This adds the subpackages to `./mach test-unit`.
This commit is contained in:
parent
76d1d78cc0
commit
7f6f072b02
6 changed files with 33 additions and 26 deletions
|
@ -999,6 +999,7 @@ mod tests {
|
|||
use sync::Arc;
|
||||
use super::{DeclarationBlock, Rule, SelectorMap};
|
||||
use selectors::LocalName;
|
||||
use string_cache::Atom;
|
||||
|
||||
/// Helper method to get some Rules from selector strings.
|
||||
/// Each sublist of the result contains the Rules for one StyleRule.
|
||||
|
@ -1043,7 +1044,7 @@ mod tests {
|
|||
fn test_get_class_name(){
|
||||
let rules_list = get_mock_rules([".intro.foo", "#top"]);
|
||||
assert_eq!(SelectorMap::get_class_name(&rules_list[0][0]), Some(Atom::from_slice("intro")));
|
||||
assert_eq!(SelectorMap::get_class_name(rules_list.get(1).get(0)), None);
|
||||
assert_eq!(SelectorMap::get_class_name(&rules_list[1][0]), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue