diff --git a/src/commands/satisfying_sort/render.rs b/src/commands/satisfying_sort/render.rs index 9117ca9..8a98dec 100644 --- a/src/commands/satisfying_sort/render.rs +++ b/src/commands/satisfying_sort/render.rs @@ -234,36 +234,12 @@ fn min_active_window_for_columns(n: usize, viewport_width: usize, target_columns max_step.saturating_mul(target_columns).clamp(1, n) } -#[cfg(test)] -fn half_block_cell(top: PixelStyle, bottom: PixelStyle) -> (PixelStyle, char) { - if top == PixelStyle::Off && bottom == PixelStyle::Off { - return (PixelStyle::Off, ' '); - } - - match (top, bottom) { - (PixelStyle::Off, style) => (style, '▄'), - (style, PixelStyle::Off) => (style, '▀'), - (a, b) if a == b => (a, '█'), - (top_style, _) => (top_style, '▀'), - } -} - #[cfg(test)] mod tests { use rand::{rngs::SmallRng, SeedableRng}; use super::*; - #[test] - fn half_block_cells_use_block_glyphs_without_color() { - let (_, up) = half_block_cell(PixelStyle::Base, PixelStyle::Off); - let (_, down) = half_block_cell(PixelStyle::Off, PixelStyle::Base); - let (_, full) = half_block_cell(PixelStyle::Base, PixelStyle::Base); - assert_eq!(up, '▀'); - assert_eq!(down, '▄'); - assert_eq!(full, '█'); - } - #[test] fn compute_logo_viewport_is_square_in_unit_space() { let viewport = compute_logo_viewport(140, 50, 1.0).expect("viewport");