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

Function test_bytes

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

Source from the content-addressed store, hash-verified

61
62#[test]
63fn test_bytes() {
64 let bump = Bump::new();
65 let source = r#"
66 @stat --rule-bytes { type: bytes; }
67 style-rule { collect: --rule-bytes; }
68 "#;
69 let css_source = ".a{}.bb{}";
70 let (counters, diagnostics) = run(&bump, source, css_source);
71 // .a{} = 4 bytes, .bb{} = 5 bytes, total = 9 bytes
72 let a = CsskitAtomSet::get_dyn_set().atom_from_str("rule-bytes");
73 assert_eq!(counters.get(&a), Some(&(StatType::Bytes, 9)));
74 assert_eq!(diagnostics.len(), 0, "No diagnostics should be generated");
75}
76
77#[test]
78fn test_lines() {

Callers

nothing calls this directly

Calls 2

atom_from_strMethod · 0.80
runFunction · 0.70

Tested by

no test coverage detected