In tests, always check for encoded length match
This commit is contained in:
parent
5952a88e8c
commit
a9b369e585
1 changed files with 1 additions and 0 deletions
|
@ -98,6 +98,7 @@ fn test_reference_images() -> Result<()> {
|
||||||
println!("{} {} {} {}", png_name, img.width, img.height, img.channels);
|
println!("{} {} {} {}", png_name, img.width, img.height, img.channels);
|
||||||
let encoded = qoi_encode_to_vec(&img.data, img.width, img.height)?;
|
let encoded = qoi_encode_to_vec(&img.data, img.width, img.height)?;
|
||||||
let expected = fs::read(qoi_path)?;
|
let expected = fs::read(qoi_path)?;
|
||||||
|
assert_eq!(encoded.len(), expected.len()); // this should match regardless
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(feature = "reference")] {
|
if #[cfg(feature = "reference")] {
|
||||||
compare_slices(&png_name, "encoding", &encoded, &expected)?;
|
compare_slices(&png_name, "encoding", &encoded, &expected)?;
|
||||||
|
|
Loading…
Reference in a new issue