diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rs index 52476db6f..8987cc64c 100644 --- a/crates/ui-egui/src/icons.rs +++ b/crates/ui-egui/src/icons.rs @@ -187,6 +187,31 @@ mod tests { assert!(appearance.contains(">(); + let pen = shapes(&svg("tool-pen")); + assert!(!pen.is_empty(), "the Pen's icon has shapes"); + let (add, delete) = (shapes(&svg("tool-pen-add")), shapes(&svg("tool-pen-delete"))); + for (tool, icon) in [("tool-pen-add", &add), ("tool-pen-delete", &delete)] { + for shape in &pen { + assert!(icon.contains(shape), "{tool}'s icon lacks the Pen's {shape}"); + } + assert!(icon.len() > pen.len(), "{tool}'s icon has a badge of its own"); + } + assert_ne!(add, delete, "plus and minus differ"); + } + #[test] fn shared_catalog_preserves_fallback_and_tool_aliases() { let ImageSource::Bytes { uri, bytes } = source("missing-icon") else { panic!("expected SVG bytes") };