| 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() { |