()
| 307 | |
| 308 | #[test] |
| 309 | fn test_read_pixels_sync() { |
| 310 | Tester::new(size(10, 12)) |
| 311 | .op(|l| l.set_draw_color((120, 40, 180))) |
| 312 | .op(|l| l.fill(xy(4, 2), xy(5, 4)).unwrap()) |
| 313 | .op(|l| { |
| 314 | let size = SizeInPixels::new(2, 3); |
| 315 | let data = l.read_pixels(PixelsXY { x: 3, y: 1 }, size).unwrap(); |
| 316 | let exp_pixels = vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 40, 180, 0, 0, 0, 120, 40, 180]; |
| 317 | assert_eq!((exp_pixels, size), data); |
| 318 | }) |
| 319 | .expect_op("set_data: from=(4, 2), to=(5, 4), data=[120, 40, 180, 120, 40, 180, 120, 40, 180, 120, 40, 180, 120, 40, 180, 120, 40, 180]") |
| 320 | .ignore_pixels() |
| 321 | .check(); |
| 322 | } |
| 323 | |
| 324 | #[test] |
| 325 | fn test_read_pixels_no_sync() { |
nothing calls this directly
no test coverage detected