From 604f2d0ea70ead34a3363a637b7ba340971e795a Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 16 Oct 2026 17:53:12 +0700 Subject: [PATCH] Wave Warp: the pinning test compares the middle row at matching coordinates (#1181) The old check zipped the padded output with the unpadded source, so pixels never lined up and it always passed. Co-Authored-By: Claude Opus 5.5 --- crates/effects/src/distort.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/effects/src/distort.rs b/crates/effects/src/distort.rs index 195ac898..7617fab2 100644 --- a/crates/effects/src/distort.rs +++ b/crates/effects/src/distort.rs @@ -568,7 +568,8 @@ mod tests { let (a, b) = (o.img.get(x + pad, edge_row + pad), im.get(x, edge_row)); assert!((0..4).all(|i| (a[i] - b[i]).abs() < 0.01), "pin {edge_row} col {x}: {a:?} vs {b:?}"); } - assert!(o.img.data.iter().zip(im.data.iter()).any(|(a, b)| differs(*a, *b)), "pin {edge_row}: layer must still distort"); + let mid = 15; + assert!((0..40).any(|x| differs(o.img.get(x + pad, mid + pad), im.get(x, mid))), "pin {edge_row}: the middle of the layer must still distort"); } }