Skip to content

Commit 84166f2

Browse files
Add test
1 parent 8d9dd0c commit 84166f2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/simpletsit5_tests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ tspan = (0.0, 1.0)
7777
prob = ODEProblem(f, u0, tspan)
7878
sol1 = solve(prob, SimpleTsit5(), dt = dt)
7979

80+
function ode(x, p, t)
81+
dx = sin(x[1])
82+
return([dx])
83+
end
84+
prob = ODEProblem(ode, [1.0], (0.0, 0.05), nothing)
85+
sol = solve(prob, SimpleTsit5(), dt = 0.05/11) # On my PC, the integration ends at 0.04545...
86+
@test sol.t[end] == 0.05
87+
8088
#=
8189
using BenchmarkTools
8290

0 commit comments

Comments
 (0)