MCPcopy Create free account
hub / github.com/csskit/csskit / test_lines

Function test_lines

crates/csskit_ast/src/collector/tests.rs:78–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77#[test]
78fn test_lines() {
79 let bump = Bump::new();
80 let source = r#"
81 @stat --rule-lines { type: lines; }
82 style-rule { collect: --rule-lines; }
83 "#;
84 let css_source = r"
85.a{
86
87}
88.bb{}";
89 let (counters, diagnostics) = run(&bump, source, css_source);
90 let a = CsskitAtomSet::get_dyn_set().atom_from_str("rule-lines");
91 assert_eq!(counters.get(&a), Some(&(StatType::Lines, 4)));
92 assert_eq!(diagnostics.len(), 0, "No diagnostics should be generated");
93}
94
95#[test]
96fn test_diagnostics_with_string() {

Callers

nothing calls this directly

Calls 2

atom_from_strMethod · 0.80
runFunction · 0.70

Tested by

no test coverage detected