MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_bucket_fill_diagonal_is_not_connected

Function test_bucket_fill_diagonal_is_not_connected

std/src/console/drawing.rs:616–626  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

614
615 #[test]
616 fn test_bucket_fill_diagonal_is_not_connected() {
617 let mut rasops = RecordingRasops::default();
618 rasops.set_draw_color(ansi_color_to_rgb(7));
619 rasops.set_pixel(PixelsXY::new(0, 0), Some(2));
620 rasops.set_pixel(PixelsXY::new(1, 1), Some(2));
621
622 bucket_fill(&mut rasops, PixelsXY::new(0, 0), 7).unwrap();
623
624 assert_eq!([CapturedRasop::DrawPixel(0, 0)], rasops.ops.as_slice());
625 assert_eq!(Some(2), rasops.peek_pixel(PixelsXY::new(1, 1)).unwrap());
626 }
627
628 #[test]
629 fn test_bucket_fill_out_of_bounds_is_noop() {

Callers

nothing calls this directly

Calls 4

ansi_color_to_rgbFunction · 0.85
bucket_fillFunction · 0.85
set_pixelMethod · 0.80
set_draw_colorMethod · 0.45

Tested by

no test coverage detected