Skip to content

Commit 86fa00f

Browse files
test: test type-stability of remake
1 parent 2d50f7e commit 86fa00f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/initializationsystem.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,3 +1496,13 @@ end
14961496
@test integ3.u [2.0, 3.0]
14971497
@test integ3.ps[c1] 2.0
14981498
end
1499+
1500+
# https://github.com/SciML/SciMLBase.jl/issues/985
1501+
@testset "Type-stability of `remake`" begin
1502+
@parameters α=1 β=1 γ=1 δ=1
1503+
@variables x(t)=1 y(t)=1
1504+
eqs = [D(x) ~ α * x - β * x * y, D(y) ~ -δ * y + γ * x * y]
1505+
@named sys = ODESystem(eqs, t)
1506+
prob = ODEProblem(complete(sys), [], (0.0, 1))
1507+
@inferred remake(prob; u0 = 2 .* prob.u0, p = prob.p)
1508+
end

0 commit comments

Comments
 (0)