From 762cf72803f12815fd0509a36471edba832e5bb1 Mon Sep 17 00:00:00 2001 From: skylar taylor-barrick Date: Sun, 15 Nov 2026 06:40:09 +0100 Subject: [PATCH] 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. --- crates/engine/src/tests/legacy_particles.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/tests/legacy_particles.rs b/crates/engine/src/tests/legacy_particles.rs index 8cd38d83c..2ebb88ee5 100644 --- a/crates/engine/src/tests/legacy_particles.rs +++ b/crates/engine/src/tests/legacy_particles.rs @@ -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"); }