In tests, always check for encoded length match

This commit is contained in:
Ivan Smirnov 2022-01-03 17:14:30 +03:00
parent 5952a88e8c
commit a9b369e585

View file

@ -98,6 +98,7 @@ fn test_reference_images() -> Result<()> {
println!("{} {} {} {}", png_name, img.width, img.height, img.channels);
let encoded = qoi_encode_to_vec(&img.data, img.width, img.height)?;
let expected = fs::read(qoi_path)?;
assert_eq!(encoded.len(), expected.len()); // this should match regardless
cfg_if! {
if #[cfg(feature = "reference")] {
compare_slices(&png_name, "encoding", &encoded, &expected)?;