API reference

TrixiTest.@test_allocationsMacro
@test_allocations(rhs!, semi, sol, allocs)

Test that the memory allocations of rhs! are below allocs (e.g., from type instabilities), where rhs! is a function with a method rhs!(du, u, semi, t).

source
TrixiTest.@test_trixi_include_baseMacro
@test_trixi_include_base(elixir; additional_ignore_content = Any[],
                                 l2=nothing, linf=nothing, RealT=Float64,
                                 atol=500*eps(RealT), rtol=sqrt(eps(RealT)),
                                 parameters...)

Test an elixir file by calling trixi_include(elixir; parameters...). The additional_ignore_content argument is passed to @trixi_test_nowarn and can be used to ignore additional patterns in the stderr output. By default, only the absence of error output is checked. If l2 or linf are specified, in addition the resulting L2/Linf errors are compared approximately against these reference values, using atol, rtol as absolute/relative tolerance.

source
TrixiTest.@timed_testsetMacro
@timed_testset "name of the testset" #= code to test #=

Similar to @testset, but prints the name of the testset and its runtime after execution.

source
TrixiTest.@trixi_test_nowarnMacro
@trixi_test_nowarn expr [additional_ignore_content]

Modified version of @test_nowarn expr that prints the content of stderr when it is not empty and ignores some common info statements. Additional patterns that should be ignored can be passed as a list of strings or regular expressions.

source
TrixiTest.@trixi_testsetMacro
@trixi_testset "name of the testset" #= code to test #=

Similar to @testset, but wraps the code inside a temporary module to avoid namespace pollution. It also includes this file again to provide the definition of @test_trixi_include_base. Moreover, it records the execution time of the testset similarly to @timed_testset.

source