Skip to content

Commit 6102139

Browse files
test: add test for vector parameters in function args
Co-authored-by: Aayush Sabharwal <[email protected]>
1 parent 3d9a8d8 commit 6102139

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
@@ -263,3 +263,12 @@ end
263263
sol = solve(prob, NewtonRaphson())
264264
@test SciMLBase.successful_retcode(sol)
265265
end
266+
267+
@testset "Vector parameters in function arguments" begin
268+
@variables x y
269+
@parameters p[1:2] (f::Function)(..)
270+
271+
@mtkbuild sys = NonlinearSystem([x^2 - p[1]^2 ~ 0, y^2 ~ f(p)])
272+
prob = NonlinearProblem(sys, [x => 1.0, y => 1.0], [p => ones(2), f => sum])
273+
@test_nowarn solve(prob, NewtonRaphson())
274+
end

0 commit comments

Comments
 (0)