()
| 899 | |
| 900 | #[test] |
| 901 | fn test_draw_rect_limits() { |
| 902 | Tester::new(size(2, 3)) |
| 903 | .op(|l| { |
| 904 | l.set_draw_color((50, 51, 52)); |
| 905 | l.draw_rect( |
| 906 | PixelsXY::new(0, 0), |
| 907 | SizeInPixels::new(2, 3), |
| 908 | ) |
| 909 | .unwrap() |
| 910 | }) |
| 911 | .expect_pixel(xy(0, 0), (50, 51, 52)) |
| 912 | .expect_pixel(xy(0, 1), (50, 51, 52)) |
| 913 | .expect_pixel(xy(0, 2), (50, 51, 52)) |
| 914 | .expect_pixel(xy(1, 0), (50, 51, 52)) |
| 915 | .expect_pixel(xy(1, 1), (50, 51, 52)) |
| 916 | .expect_pixel(xy(1, 2), (50, 51, 52)) |
| 917 | .expect_op("set_data: from=(0, 0), to=(1, 2), data=[50, 51, 52, 50, 51, 52, 50, 51, 52, 50, 51, 52, 50, 51, 52, 50, 51, 52]") |
| 918 | .check(); |
| 919 | } |
| 920 | |
| 921 | #[test] |
| 922 | fn test_draw_rect_clip() { |
nothing calls this directly
no test coverage detected