Skip to content

Commit bc900d4

Browse files
Regression test callback doubling
Regression test for #2695
1 parent a11f27d commit bc900d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/OrdinaryDiffEqDefault/test/default_solver_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ cb = ContinuousCallback((u, t, integrator) -> t - 1, (integrator) -> nothing)
117117
SA_ode_problem = ODEProblem((u, p, t) -> zero(u), SA[0], 2)
118118
@test solve(SA_ode_problem; callback = cb).retcode == ReturnCode.Success
119119

120+
# Regression test callback doubling, https://github.com/SciML/ModelingToolkit.jl/issues/3327
121+
@test length(init(SA_ode_problem; callback = cb).opts.callback.continuous_callbacks) == 1
122+
120123
# test Complex numbers
121124
H(s) = (1 - s) * complex([0 1; 1 0]) + s * complex([1 0; 0 -1])
122125
schrod_eq(state, time, s) = -im * time * H(s) * state

0 commit comments

Comments
 (0)