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

Function test_read_pixels_no_sync

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

Source from the content-addressed store, hash-verified

323
324#[test]
325fn test_read_pixels_no_sync() {
326 Tester::new(size(10, 12))
327 .op(|l| l.set_sync(false))
328 .op(|l| l.set_draw_color((120, 40, 180)))
329 .op(|l| l.fill(xy(4, 2), xy(5, 4)).unwrap())
330 .op(|l| {
331 let size = SizeInPixels::new(2, 3);
332 let data = l.read_pixels(PixelsXY { x: 3, y: 1 }, size).unwrap();
333 let exp_pixels = vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 40, 180, 0, 0, 0, 120, 40, 180];
334 assert_eq!((exp_pixels, size), data);
335 })
336 .expect_damage(xy(4, 2), xy(5, 4))
337 .ignore_pixels()
338 .check();
339}
340
341#[test]
342fn test_put_pixels_sync() {

Callers

nothing calls this directly

Calls 10

ignore_pixelsMethod · 0.80
expect_damageMethod · 0.80
opMethod · 0.80
fillMethod · 0.80
sizeFunction · 0.70
xyFunction · 0.70
checkMethod · 0.45
set_syncMethod · 0.45
set_draw_colorMethod · 0.45
read_pixelsMethod · 0.45

Tested by

no test coverage detected