()
| 26 | |
| 27 | #[test] |
| 28 | fn test_basic() { |
| 29 | let bump = Bump::new(); |
| 30 | let source = r#" |
| 31 | @stat --total-rules { type: counter; } |
| 32 | style-rule { collect: --total-rules; } |
| 33 | "#; |
| 34 | let css_source = r#" |
| 35 | .foo {} |
| 36 | #bar {} |
| 37 | .baz {} |
| 38 | "#; |
| 39 | let (counters, diagnostics) = run(&bump, source, css_source); |
| 40 | let a = CsskitAtomSet::get_dyn_set().atom_from_str("total-rules"); |
| 41 | assert_eq!(counters.get(&a), Some(&(StatType::Counter, 3))); |
| 42 | assert_eq!(diagnostics.len(), 0, "No diagnostics should be generated"); |
| 43 | } |
| 44 | |
| 45 | #[test] |
| 46 | fn test_implicit_counter() { |
nothing calls this directly
no test coverage detected