Skip to content

Commit f673c2e

Browse files
committed
Add test for ErrorException when calling solution computed with dense=false
1 parent 30bae8c commit f673c2e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

test/many_ode.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ import Logging: Warn
3434
δt = (_abstol/q0T[1].coeffs[end-1])^inv(_order-1)
3535
@test TaylorIntegration.stepsize(q0T, _abstol) == δt
3636

37-
sol = (@test_logs (Warn, max_iters_reached()) taylorinteg(
38-
eqs_mov!, q0, 0.0, 0.5, _order, _abstol, nothing))
39-
@test_logs((Warn, max_iters_reached()),
37+
sol = @test_logs((Warn, max_iters_reached()),
4038
@inferred(TaylorSolution{Float64, Float64, 2},
4139
taylorinteg(eqs_mov!, q0, 0.0, 0.5, _order, _abstol, nothing)))
40+
@test_throws ErrorException sol(0.25)
4241
tv = sol.t; xv = sol.x
4342
@test length(tv) == 501
4443
@test isa(xv, SubArray)

test/solution.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import Logging: Warn
1010
xv = rand(2,2)
1111
psol = Taylor1.(rand(2,1),2)
1212
nsteps = 2
13-
# @show @code_warntype TaylorIntegration.build_solution(tv, xv, psol, nsteps)
1413
sol2 = TaylorIntegration.build_solution(tv, xv, psol, nsteps)
1514
@test sol2 isa TaylorSolution{Float64, Float64, 2}
1615
@test string(sol2) == "tspan: (1.0, 2.0), x: 2 Float64 variables"
17-
# @show @code_warntype TaylorIntegration.build_solution(tv, Vector(xv[1,:]), Vector(psol[1,:]), nsteps)
1816
sol1 = TaylorIntegration.build_solution(tv, Vector(xv[1,:]), Vector(psol[1,:]), nsteps)
1917
@test sol1 isa TaylorSolution{Float64, Float64, 1}
2018
@test string(sol1) == "tspan: (1.0, 2.0), x: 1 Float64 variable"

0 commit comments

Comments
 (0)