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

Function test_draw_pixel_limits

std/src/gfx/lcd/buffered/tests.rs:827–841  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

825
826#[test]
827fn test_draw_pixel_limits() {
828 Tester::new(size(20, 30))
829 .op(|l| l.set_draw_color((50, 51, 52)))
830 .op(|l| l.draw_pixel(PixelsXY::new(0, 0)).unwrap())
831 .expect_pixel(xy(0, 0), (50, 51, 52))
832 .expect_op("set_data: from=(0, 0), to=(0, 0), data=[50, 51, 52]")
833 .check();
834
835 Tester::new(size(20, 30))
836 .op(|l| l.set_draw_color((50, 51, 52)))
837 .op(|l| l.draw_pixel(PixelsXY::new(19, 29)).unwrap())
838 .expect_pixel(xy(19, 29), (50, 51, 52))
839 .expect_op("set_data: from=(19, 29), to=(19, 29), data=[50, 51, 52]")
840 .check();
841}
842
843#[test]
844fn test_draw_pixel_out_of_bounds() {

Callers

nothing calls this directly

Calls 8

expect_opMethod · 0.80
expect_pixelMethod · 0.80
opMethod · 0.80
sizeFunction · 0.70
xyFunction · 0.70
checkMethod · 0.45
set_draw_colorMethod · 0.45
draw_pixelMethod · 0.45

Tested by

no test coverage detected