Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
johnzl-777 committed Jan 11, 2024
1 parent 56cd277 commit 7804c46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
13 changes: 13 additions & 0 deletions test/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,17 @@ end
@test callback_times == times
end
end

@testset "integrate! exception" begin
solver = DP5Solver(
fcn,
0.0,
ComplexF64[1.0, 0.0]
;
maximum_allowed_steps=10

)

@test_throws DormandPrince.DPException integrate!(solver, 2π)
end
end
12 changes: 11 additions & 1 deletion test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ function stiff_fcn(x, y, f)
f[1] = y[1]^2 - y[1]^3
end

@testset "DP8 Solver" begin
solver = DP8Solver(
stiff_fcn,
0.0,
[0.0001]
)

show(stdout, MIME"text/plain"(), solver)
end

@testset "Successful Options Check with Successful Integration" begin
solver = DP5Solver(
stiff_fcn,
Expand All @@ -27,7 +37,7 @@ end
stiff_fcn,
0.0,
[0.0001];
maximum_allowed_steps=10 #
maximum_allowed_steps=10
)

report = DormandPrince.integrate_core!(solver, 2/0.0001)
Expand Down

0 comments on commit 7804c46

Please sign in to comment.