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 @@ -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"
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
22 changes: 9 additions & 13 deletions test/test_util.jl
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Expand Down
Loading