Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ SummationByPartsOperatorsExtra = "0.1.3"
Test = "1"
TestItemRunner = "1"
TestItems = "1"
TrixiTest = "0.1.2, 0.2"
TrixiTest = "0.2.7"
21 changes: 9 additions & 12 deletions test/test_util.jl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
Loading