()
| 323 | |
| 324 | #[test] |
| 325 | fn 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] |
| 342 | fn test_put_pixels_sync() { |
nothing calls this directly
no test coverage detected