Skip to content

Commit c00f09f

Browse files
test: add tests for fast_subsitute on function of array of symbolics
1 parent 4c06584 commit c00f09f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/utils.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,12 @@ end
153153
test_nested_derivative = Dx(Dt(Dt(u)))
154154
result = diff2term(Symbolics.value(test_nested_derivative))
155155
@test typeof(result) === Symbolics.BasicSymbolic{Real}
156-
end
156+
end
157+
158+
@testset "`fast_substitute` inside array symbolics" begin
159+
@variables x y z
160+
@register_symbolic foo(a::AbstractArray, b)
161+
ex = foo([x, y], z)
162+
ex2 = Symbolics.fixpoint_sub(ex, Dict(y => 1.0, z => 2.0))
163+
@test isequal(ex2, foo([x, 1.0], 2.0))
164+
end

0 commit comments

Comments
 (0)