Skip to content

Commit

Permalink
Attempt unit tests for pretty printing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnzl-777 committed Jan 11, 2024
1 parent 59b1de4 commit a4afb98
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ end

@testset "Error Paths" begin
include("errors.jl")
end

@testset "Pretty Printing" begin
include("show.jl")
end
21 changes: 21 additions & 0 deletions test/show.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# show solver and report

using DormandPrince

function stiff_fcn(x, y, f)
f[1] = y[1]^2 - y[1]^3
end

solver = DP5Solver(
stiff_fcn,
0.0,
[0.0001]
;
maximum_allowed_steps=100
)

show(solver)

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

show(report)

0 comments on commit a4afb98

Please sign in to comment.