mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-30 18:27:00 +01:00
Exercise enabled large-image codecs in minimal builds
This commit is contained in:
1 parent
d3dbcca7c5
commit
31f92f097f
1 file changed
+1
-7
@@ -359,13 +359,7 @@ fn feature_config_empty_image_rejected() {
|
||||
#[test]
|
||||
fn larger_image_png_tiff_exact() {
|
||||
let img = synth(513, 257, ChannelLayout::Rgba, SampleType::U16, 99, 1.0);
|
||||
for f in [
|
||||
Format::Png,
|
||||
#[cfg(feature = "tiff")]
|
||||
Format::Tiff,
|
||||
#[cfg(feature = "pnm")]
|
||||
Format::Pnm,
|
||||
] {
|
||||
for f in [Format::Png, Format::Tiff, Format::Pnm].into_iter().filter(|f| caps(*f).read && caps(*f).write) {
|
||||
let back = decode(&encode(&img, f, &EncodeOptions::default()).unwrap()).unwrap();
|
||||
assert_eq!(back.data(), img.data(), "{f:?}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user