From c00f09f48252bc37c246ffcdd8536c30e80d741e Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Thu, 9 Jan 2025 14:12:38 +0530 Subject: [PATCH] test: add tests for `fast_subsitute` on function of array of symbolics --- test/utils.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/utils.jl b/test/utils.jl index b47c1146a..8203b41f6 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -153,4 +153,12 @@ end test_nested_derivative = Dx(Dt(Dt(u))) result = diff2term(Symbolics.value(test_nested_derivative)) @test typeof(result) === Symbolics.BasicSymbolic{Real} -end \ No newline at end of file +end + +@testset "`fast_substitute` inside array symbolics" begin + @variables x y z + @register_symbolic foo(a::AbstractArray, b) + ex = foo([x, y], z) + ex2 = Symbolics.fixpoint_sub(ex, Dict(y => 1.0, z => 2.0)) + @test isequal(ex2, foo([x, 1.0], 2.0)) +end