diff --git a/src/filter.rs b/src/filter.rs index 856008ec..c56ff84a 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -1157,6 +1157,18 @@ mod test { } } + #[test] + fn paeth_impls_are_equivalent() { + use super::{filter_paeth, filter_paeth_decode}; + for a in 0..=255 { + for b in 0..=255 { + for c in 0..=255 { + assert_eq!(filter_paeth(a, b, c), filter_paeth_decode(a, b, c)); + } + } + } + } + #[test] fn roundtrip_ascending_previous_line() { // A multiple of 8, 6, 4, 3, 2, 1