diff --git a/vello_tests/tests/property.rs b/vello_tests/tests/property.rs index 368174d5b..061f47799 100644 --- a/vello_tests/tests/property.rs +++ b/vello_tests/tests/property.rs @@ -55,16 +55,19 @@ fn empty_scene(use_cpu: bool) { }; let image = vello_tests::render_then_debug_sync(&scene, ¶ms).unwrap(); assert_eq!(image.format, Format::Rgba8); - // FIXME(color): Enable when there is a solution for PartialEq - /* for pixel in image.data.data().chunks_exact(4) { let &[r, g, b, a] = pixel else { unreachable!() }; let image_color = Color::from_rgba8(r, g, b, a); - if image_color != color { - panic!("Got {image_color:?}, expected clear colour {color:?}"); + // FIXME(color): Enable when there is a solution for PartialEq. This should + // not be discarding alpha, but there's no AlphaColor::difference. + if image_color + .discard_alpha() + .difference(color.discard_alpha()) + < 1e-4 + { + panic!("Got {image_color:?}, expected clear color {color:?}"); } } - */ } #[test]