Skip to content

Commit 22251b1

Browse files
unhappychoiceclaude
andcommitted
test(render): cover media_pixel in registry / shape / snapshot lists
Three follow-on additions caught by the Phase 3 self-review pass on PR #260: - `registry_resolves_all_builtins` learns the `media_pixel` builtin. - `default_renderer_covers_every_shape` iterates `Shape::PixelArt`. - `xtask::snapshots::renderer_dimensions` overrides the default (40 × 5) with a tighter (20 × 5) box matched to the canonical 4 × 4 PixelArt sample plus its caption row. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent ca78384 commit 22251b1

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/render/mod.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ mod tests {
740740
"chart_histogram",
741741
"chart_pie",
742742
"media_image",
743+
"media_pixel",
743744
] {
744745
assert!(r.get(name).is_some(), "missing builtin renderer: {name}");
745746
}
@@ -759,6 +760,7 @@ mod tests {
759760
Shape::PointSeries,
760761
Shape::Bars,
761762
Shape::Image,
763+
Shape::PixelArt,
762764
Shape::Calendar,
763765
Shape::Heatmap,
764766
Shape::Badge,

‎xtask/src/snapshots.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ fn renderer_dimensions(renderer: &str) -> (u16, u16) {
8181
"chart_histogram" => (40, 6),
8282
"chart_pie" => (40, 10),
8383
"media_image" => (40, 5),
84+
// Canonical PixelArt sample is a 4x4 smiley (2 cells wide × 2 cells tall) with a
85+
// one-line caption; (20, 5) gives breathing room without dwarfing the sprite.
86+
"media_pixel" => (20, 5),
8487
"grid_calendar" => (28, 10),
8588
"grid_heatmap" => (40, 6),
8689
"list_timeline" => (50, 8),
@@ -228,6 +231,7 @@ mod tests {
228231
("chart_histogram", (40, 6)),
229232
("chart_pie", (40, 10)),
230233
("media_image", (40, 5)),
234+
("media_pixel", (20, 5)),
231235
("grid_calendar", (28, 10)),
232236
("grid_heatmap", (40, 6)),
233237
("list_timeline", (50, 8)),

0 commit comments

Comments
 (0)