Skip to content

Commit 84600ad

Browse files
committed
add test
1 parent dbbab46 commit 84600ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/interface/ode_initdt_tests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@ sol = solve(prob, Rodas5())
6464
# test that dtmin is set based on timespan
6565
prob = ODEProblem((u, p, t) -> 1e20 * sin(1e20 * t), 0.1, (0, 1e-19))
6666
@test solve(prob, Tsit5()).retcode == ReturnCode.Success
67+
68+
#test that we are robust to u0=0, t0!=0
69+
integ = init(ODEProblem(((u,p,t)->u), 0f0, (20f0, 0f0)), Tsit5())
70+
@test abs(integ.dt) > eps(integ.t)
71+
integ = init(ODEProblem(((du,u,p,t)->du.=u), [0f0], (20f0, 0f0)), Tsit5())
72+
@test abs(integ.dt) > eps(integ.t)

0 commit comments

Comments
 (0)