Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

PSD smart filters test: compare Wave's settings, not Photoshop's descriptor name

abc2cb99b23f70079e
diff --git a/crates/io/src/smart_map.rs b/crates/io/src/smart_map.rs
index cb100ca55..6e0f0f848 100644
--- a/crates/io/src/smart_map.rs
+++ b/crates/io/src/smart_map.rs
@@ -1059,7 +1059,10 @@ mod tests {
"undefinedAreas": "wrap", "seed": 1270346})
)
);
- assert_eq!(item_for_filter(&f).unwrap().get("Fltr"), Some(&Value::Descriptor(unscaled)));
+ match item_for_filter(&f).unwrap().get("Fltr") {
+ Some(Value::Descriptor(ours)) => assert_eq!((&ours.class_id, &ours.items), (&unscaled.class_id, &unscaled.items)),
+ other => panic!("wave: no Fltr ({other:?})"),
+ }
}
/// Invert on a smart object: Photoshop stores no `Fltr`, but `hasoptions` and its filter id.