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

Function test_atom_from_bits

crates/css_lexer/src/dyn_atom_registry.rs:352–361  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

350
351 #[test]
352 fn test_atom_from_bits() {
353 let combined = DynAtomRegistry::<TestAtomSet>::new();
354
355 let px_atom = combined.atom_from_str("px");
356 let px_bits = px_atom.as_bits();
357
358 let px_atom2 = combined.atom_from_bits(px_bits);
359 assert_eq!(px_atom, px_atom2);
360 assert_eq!(combined.atom_to_str(px_atom2), Some("px"));
361 }
362}

Callers

nothing calls this directly

Calls 3

atom_from_strMethod · 0.80
as_bitsMethod · 0.80
atom_from_bitsMethod · 0.80

Tested by

no test coverage detected