Skip to content

Commit

Permalink
Fill in slightly more code for the image testing.
Browse files Browse the repository at this point in the history
This still needs a real solution, but just want to get it past
clippy.
  • Loading branch information
waywardmonkeys committed Nov 25, 2024
1 parent 1d8499c commit 769f86d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions vello_tests/tests/property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,19 @@ fn empty_scene(use_cpu: bool) {
};
let image = vello_tests::render_then_debug_sync(&scene, &params).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]
Expand Down

0 comments on commit 769f86d

Please sign in to comment.