EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Expressions: test that a frozen kept layer reads the project again
tylerjenningsw4b7ed9c77f94
diff --git a/crates/expr/src/tests.rs b/crates/expr/src/tests.rsindex bd942f7b0..dbf686c8e 100644--- a/crates/expr/src/tests.rs+++ b/crates/expr/src/tests.rs@@ -1407,6 +1407,10 @@ fn a_kept_layer_reads_the_project_again() {assert_close!(f.num("thisLayer.index * 10 + thisLayer.name.length", 0.0), 21.0);let _ = f.ev(f.a, ROT, "var L = thisLayer; delete L.__c; delete L.__l; delete L.__i; delete L.__s; 0", 0.0);assert_close!(f.num("thisLayer.index * 10 + thisLayer.name.length", 0.0), 21.0);+ let _ = f.ev(f.a, ROT, "Object.freeze(thisLayer); 0", 0.0);+ f.layer_mut(f.a).name = "Ay".into();+ f.p.comp_mut(f.cid).unwrap().layers.swap(0, 1);+ assert_close!(f.num("thisLayer.index * 10 + thisLayer.name.length", 0.0), 12.0);}/// The kept layers are bounded: past the bound a layer isn't kept, an evaluation that makes more