From e54c77368a7de84eb0a2aa64fc56275a4f6edfee Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Sat, 21 Oct 2023 15:15:52 +0200 Subject: [PATCH] add if clause for coverage --- test/test_tree_2d_kpp.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/test_tree_2d_kpp.jl b/test/test_tree_2d_kpp.jl index a0057ce386a..d7ef2d7de17 100644 --- a/test/test_tree_2d_kpp.jl +++ b/test/test_tree_2d_kpp.jl @@ -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