diff --git a/Project.toml b/Project.toml index 5cfd5426..3846956e 100644 --- a/Project.toml +++ b/Project.toml @@ -46,7 +46,7 @@ SparseArrays = "1" SpecialFunctions = "2" StaticArrays = "1.9.8" TimerOutputs = "0.5.25, 1" -TrixiBase = "0.1.6" +TrixiBase = "0.1.6, 0.2" TypedPolynomials = "0.4.1" WriteVTK = "1.18" julia = "1.10" diff --git a/test/Project.toml b/test/Project.toml index 9547e700..b5d14535 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -33,5 +33,5 @@ StaticArrays = "1.9.8" Test = "1" TestItemRunner = "1" TestItems = "1" -TrixiTest = "0.1.2, 0.2" +TrixiTest = "0.2.7" WriteVTK = "1.18" diff --git a/test/test_util.jl b/test/test_util.jl index fa5db946..f6364dbb 100644 --- a/test/test_util.jl +++ b/test/test_util.jl @@ -1,4 +1,4 @@ -using TrixiTest: @trixi_test_nowarn, get_kwarg +using TrixiTest: @trixi_test_nowarn, get_kwarg, trixi_include_kwargs """ test_include_example(example; l2=nothing, linf=nothing, @@ -21,22 +21,18 @@ macro test_include_example(example, args...) local least_square_test = get_kwarg(args, :least_square_test, false) local regularization_test = get_kwarg(args, :regularization_test, false) local pde_test = get_kwarg(args, :pde_test, false) - local kwargs = Pair{Symbol, Any}[] - for arg in args - if (arg.head == :(=) && - !(arg.args[1] in (:l2, :linf, :l2_ls, :linf_ls, :l2_reg, :linf_reg, - :atol, :rtol, - :interpolation_test, :least_square_test, :regularization_test, - :pde_test))) - push!(kwargs, Pair(arg.args...)) - end - end + local kwargs = trixi_include_kwargs(args; + reserved = (:l2, :linf, :l2_ls, :linf_ls, + :l2_reg, :linf_reg, :atol, :rtol, + :interpolation_test, + :least_square_test, + :regularization_test, :pde_test)) return quote println("═"^100) - println($example) + println($(esc(example))) # evaluate examples in the scope of the module they're called from - @trixi_test_nowarn trixi_include(@__MODULE__, $example; $kwargs...) + @trixi_test_nowarn trixi_include(@__MODULE__, $(esc(example)); $(kwargs...)) # if present, compare l2 and linf against reference values if !isnothing($l2) || !isnothing($linf) if !$pde_test