test: prove the particle controls survive, not just that they are not true (#1898)

The explicit-choice check in only_a_writer_before_v0_10_0_gets_the_old_compositing used
`all(|g| g.get(COMPOSITE).is_none_or(|p| p.value == Bool(false)))`, which also passes when the
control is gone: it could not tell "kept off" from "never written". Collect the values that are
there and require exactly one false per particle effect (the Fill below them has none), so a
reviewer can see the control is preserved.
This commit is contained in:
skylar taylor-barrick committed 2026-11-15 06:40:09 +01:00
1 parent 69d641e30a
commit 762cf72803
1 file changed
+2 -1
+2 -1
View File
@@ -165,5 +165,6 @@ fn only_a_writer_before_v0_10_0_gets_the_old_compositing() {
let mut explicit = Project::from_json(&file_text(&s, Some("0.6.0"), true)).unwrap();
crate::upgrade_effects(&mut explicit, Some("0.6.0"));
let fx = explicit.comp(cid).unwrap().layer(LayerId(lid)).unwrap().effects().unwrap();
assert!(fx.groups().all(|g| g.get(COMPOSITE).is_none_or(|p| p.value == KV::Bool(false))), "an explicit choice wins");
let kept: Vec<_> = fx.groups().filter_map(|g| g.get(COMPOSITE).map(|p| p.value.clone())).collect();
assert_eq!(kept, vec![KV::Bool(false); PARTICLES.len()], "an explicit choice wins, and both controls are still there");
}