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

Function test_block_metadata_merge

crates/css_ast/src/metadata.rs:499–514  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

497
498 #[test]
499 fn test_block_metadata_merge() {
500 let mut meta1 = CssMetadata::default();
501 meta1.property_groups = PropertyGroup::Color;
502 meta1.declaration_kinds = DeclarationKind::Important;
503
504 let mut meta2 = CssMetadata::default();
505 meta2.property_groups = PropertyGroup::Position;
506 meta2.declaration_kinds = DeclarationKind::Custom;
507
508 let merged = meta1.merge(meta2);
509
510 assert!(merged.property_groups.contains(PropertyGroup::Color));
511 assert!(merged.property_groups.contains(PropertyGroup::Position));
512 assert!(merged.declaration_kinds.contains(DeclarationKind::Important));
513 assert!(merged.declaration_kinds.contains(DeclarationKind::Custom));
514 }
515
516 #[test]
517 fn test_stylesheet_metadata_simple() {

Callers

nothing calls this directly

Calls 1

mergeMethod · 0.45

Tested by

no test coverage detected