From 02b0f6b7631fb480531ecc487fad89bb1daf07b7 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Thu, 27 Aug 2026 15:26:31 +0200 Subject: [PATCH 1/2] allow TrixiBase.jl v0.2 --- Project.toml | 2 +- docs/Project.toml | 2 +- test/Project.toml | 2 +- test/test_util.jl | 21 +++++++++------------ 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Project.toml b/Project.toml index 1910a3c..274b6a3 100644 --- a/Project.toml +++ b/Project.toml @@ -33,5 +33,5 @@ SimpleUnPack = "1.1.0" StaticArrays = "1.9" SummationByPartsOperators = "0.5.78" TimerOutputs = "0.5.25, 1.1" -TrixiBase = "0.1.6" +TrixiBase = "0.1.6, 0.2" julia = "1.10" diff --git a/docs/Project.toml b/docs/Project.toml index b8bca65..3cc3f42 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -6,4 +6,4 @@ TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284" [compat] Documenter = "1" DocumenterCodeBlocks = "1" -TrixiBase = "0.1.1" +TrixiBase = "0.1.6, 0.2" diff --git a/test/Project.toml b/test/Project.toml index 3136127..1a05a12 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -26,4 +26,4 @@ SummationByPartsOperatorsExtra = "0.1.3" Test = "1" TestItemRunner = "1" TestItems = "1" -TrixiTest = "0.1.2, 0.2" +TrixiTest = "0.2.7" diff --git a/test/test_util.jl b/test/test_util.jl index bfdbccc..6162af4 100644 --- a/test/test_util.jl +++ b/test/test_util.jl @@ -1,5 +1,5 @@ using Test: @test -using TrixiTest: @trixi_test_nowarn, get_kwarg +using TrixiTest: @trixi_test_nowarn, get_kwarg, trixi_include_kwargs # Use a macro to avoid world age issues when defining new initial conditions etc. # inside an example. @@ -37,22 +37,19 @@ macro test_trixi_include(example, args...) local atol = get_kwarg(args, :atol, atol_default) local rtol = get_kwarg(args, :rtol, rtol_default) - local kwargs = Pair{Symbol, Any}[] - for arg in args - if (arg.head == :(=) && - !(arg.args[1] in (:l2, :linf, :cons_error, :change_mass, :change_entropy, - :entropy_timederivative, :RealT_for_test_tolerances, - :atol, :rtol))) - push!(kwargs, Pair(arg.args...)) - end - end + local kwargs = trixi_include_kwargs(args; + reserved = (:l2, :linf, :cons_error, :change_mass, + :change_entropy, + :entropy_timederivative, + :RealT_for_test_tolerances, :atol, + :rtol)) 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, linf and conservation errors against reference values if !isnothing($l2) || !isnothing($linf) || !isnothing($cons_error) From 5203a48c9ec8989736d065df4b2db8214a99c553 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Thu, 27 Aug 2026 15:27:49 +0200 Subject: [PATCH 2/2] format --- test/test_util.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_util.jl b/test/test_util.jl index 6162af4..ba3457e 100644 --- a/test/test_util.jl +++ b/test/test_util.jl @@ -41,8 +41,8 @@ macro test_trixi_include(example, args...) reserved = (:l2, :linf, :cons_error, :change_mass, :change_entropy, :entropy_timederivative, - :RealT_for_test_tolerances, :atol, - :rtol)) + :RealT_for_test_tolerances, + :atol, :rtol)) quote println("═"^100)