Skip to content

Commit 0f04a53

Browse files
test: add test for vector parameters in function args
Co-authored-by: Aayush Sabharwal <[email protected]>
1 parent 4eb88e8 commit 0f04a53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/scc_nonlinear_problem.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,12 @@ end
282282
sccprob = SCCNonlinearProblem(fullsys, u0, p)
283283
@test isequal(parameters(fullsys), parameters(sccprob.f.sys))
284284
end
285+
286+
@testset "Vector parameters in function arguments" begin
287+
@variables x y
288+
@parameters p[1:2] (f::Function)(..)
289+
290+
@mtkbuild sys = NonlinearSystem([x^2 - p[1]^2 ~ 0, y^2 ~ f(p)])
291+
prob = NonlinearProblem(sys, [x => 1.0, y => 1.0], [p => ones(2), f => sum])
292+
@test_nowarn solve(prob, NewtonRaphson())
293+
end

0 commit comments

Comments
 (0)