Skip to content

Commit

Permalink
more printing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha committed Oct 4, 2020
1 parent 63b9fa4 commit abd7087
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/2d/parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ stepsize_callback = StepsizeCallback(cfl=1.6)
save_solution = SaveSolutionCallback(interval=100,
save_initial_solution=true,
save_final_solution=true,
solution_variables=:primitive)
solution_variables=:conservative)
# TODO: Taal, IO
# restart_interval = 10

Expand Down
38 changes: 34 additions & 4 deletions test/test_examples_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,62 @@ end


@testset "Displaying components 2D" begin
@test_nowarn include(joinpath(EXAMPLES_DIR, "parameters.jl"))
@test_nowarn include(joinpath(EXAMPLES_DIR, "parameters_amr.jl"))

# test both short and long printing formats
@test_nowarn show(mesh); println()
@test_nowarn println(mesh)
@test_nowarn display(mesh)

@test_nowarn show(equations); println()
@test_nowarn println(equations)
@test_nowarn display(equations)

@test_nowarn show(solver); println()
@test_nowarn println(solver)
@test_nowarn display(solver)

@test_nowarn show(solver.basis); println()
@test_nowarn println(solver.basis)
@test_nowarn display(solver.basis)

@test_nowarn show(solver.mortar); println()
@test_nowarn println(solver.mortar)
@test_nowarn display(solver.mortar)

@test_nowarn show(semi); println()
@test_nowarn println(semi)
@test_nowarn display(semi)

@test_nowarn show(summary_callback); println()
@test_nowarn println(summary_callback)
@test_nowarn display(summary_callback)

@test_nowarn show(amr_indicator); println()
@test_nowarn println(amr_indicator)
@test_nowarn display(amr_indicator)

@test_nowarn show(amr_callback); println()
@test_nowarn println(amr_callback)
@test_nowarn display(amr_callback)

@test_nowarn show(stepsize_callback); println()
@test_nowarn println(stepsize_callback)
@test_nowarn display(stepsize_callback)

@test_nowarn println(analysis_callback)
@test_nowarn display(analysis_callback)

@test_nowarn show(save_solution); println()
@test_nowarn println(save_solution)
@test_nowarn display(save_solution)

@test_nowarn show(analysis_callback); println()
@test_nowarn println(analysis_callback)
@test_nowarn display(analysis_callback)

@test_nowarn show(alive_callback); println()
@test_nowarn println(alive_callback)
@test_nowarn display(alive_callback)

@test_nowarn println(callbacks)
end


Expand Down

0 comments on commit abd7087

Please sign in to comment.