Skip to content

Commit

Permalink
add if clause for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Oct 21, 2023
1 parent 8e6055b commit e54c773
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/test_tree_2d_kpp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ EXAMPLES_DIR = joinpath(examples_dir(), "tree_2d_dgsem")
rtol = 1e-6,
skip_coverage = true)

# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
if skip_coverage == false
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
end
end
Expand Down

0 comments on commit e54c773

Please sign in to comment.