Helper: check two pixel values are within ±tolerance per channel.
| 828 | |
| 829 | // Helper: check two pixel values are within ±tolerance per channel. |
| 830 | static bool near_eq(uint8_t a, uint8_t b, int tol = 1) { |
| 831 | return (a >= b ? a - b : b - a) <= tol; |
| 832 | } |
| 833 | |
| 834 | FL_TEST_CASE("CanvasMapped non-rect matches Canvas within 1 LSB - R1") { |
| 835 | const int W = 8, H = 8, N = W * H; |