.
diff --git a/vello_tests/snapshots/fill_command_respects_clip_bounds.png b/vello_tests/snapshots/fill_command_respects_clip_bounds.png index 485db21..e31ffa3 100644 --- a/vello_tests/snapshots/fill_command_respects_clip_bounds.png +++ b/vello_tests/snapshots/fill_command_respects_clip_bounds.png
@@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ce47e8dfe449ec3eb487e353956e24f679f7ab6d4465f99ed58eb8ca8a5aca4 +oid sha256:26fe5d3906678e0b6beb69012fe02c25a1ee55b95ee2d55a8bf52dea75e0be1f size 189
diff --git a/vello_tests/test_support/src/diff.rs b/vello_tests/test_support/src/diff.rs index a083f62..8f3e25b 100644 --- a/vello_tests/test_support/src/diff.rs +++ b/vello_tests/test_support/src/diff.rs
@@ -170,10 +170,6 @@ } fn is_pix_diff(pixel1: &Rgba<u8>, pixel2: &Rgba<u8>, threshold: u8) -> bool { - if pixel1.0[3] == 0 && pixel2.0[3] == 0 { - return false; - } - pixel1 .0 .iter() @@ -230,9 +226,11 @@ } #[test] - fn fully_transparent_pixels_ignore_colour() { + fn fully_transparent_pixels_compare_colour() { let expected = single_pixel([0, 0, 0, 0]); let actual = single_pixel([255, 255, 255, 0]); - assert!(get_diff(&expected, &actual, 0, 0).is_none()); + let (_, pixels) = + get_diff(&expected, &actual, 0, 0).expect("transparent colour change must be a diff"); + assert_eq!(pixels[0].difference, [255, 255, 255, 0]); } }