waLBerla 7.3
Loading...
Searching...
No Matches
walberla::v8::testing Namespace Reference

Namespaces

namespace  printing

Classes

class  AssertionError
class  TestsRunner
 Primary test orchestrator. More...
class  with_tolerance
 Floating-point near-equality assertions with given tolerances. More...

Functions

std::filesystem::path tmp_dir ()
 Create and obtain a unique temporary directory.
void assert_true (bool cond, const std::source_location loc=std::source_location::current())
 Check if the given boolean condition is true.
void assert_false (bool cond, const std::source_location loc=std::source_location::current())
 Check if the given boolean condition is false.
template<typename TException>
void throws (const std::function< void() > &func, const std::source_location loc=std::source_location::current())
 Check if the given callback function raises an expected exception type.
template<std::equality_comparable T>
void assert_equal (const T &actual, const T &desired, const std::source_location loc=std::source_location::current())
 Check if two values are equal.
template<std::equality_comparable T>
void assert_inequal (const T &left, const T &right, const std::source_location loc=std::source_location::current())
 Check if two values are inequal.
template<std::totally_ordered T>
void assert_less (const T &left, const T &right, const std::source_location loc=std::source_location::current())
 Check if one value is less than another.
template<std::totally_ordered T>
void assert_greater (const T &left, const T &right, const std::source_location loc=std::source_location::current())
 Check if one value is greater than another.
template<std::totally_ordered T>
void assert_less_equal (const T &left, const T &right, const std::source_location loc=std::source_location::current())
 Check if one value is less or equal to another.
template<std::totally_ordered T>
void assert_greater_equal (const T &left, const T &right, const std::source_location loc=std::source_location::current())
 Check if one value is greater or equal to another.
template<std::ranges::range R1, std::ranges::range R2>
void assert_range_equal (const R1 &actual, const R2 &desired, const std::source_location loc=std::source_location::current())
 Check if two ranges have identical elements.
template<std::ranges::range R1>
void assert_range_equal (const R1 &actual, const std::ranges::range_value_t< R1 > &desired, const std::source_location loc=std::source_location::current())
 Check if all elements of a range are equal to a desired value.
template<std::ranges::range R1, std::ranges::range R2>
void assert_range_inequal (R1 actual, R2 desired, const std::source_location loc=std::source_location::current())
template<std::floating_point T>
void assert_close (T actual, T desired, const std::source_location loc=std::source_location::current())
 See with_tolerance::assert_close.
template<std::ranges::range R1, std::ranges::range R2>
void assert_allclose (const R1 &actual, const R2 &desired, const std::source_location loc=std::source_location::current())
 See with_tolerance::assert_allclose.
template<std::ranges::sized_range R1>
void assert_allclose (const R1 &actual, std::ranges::range_value_t< R1 > desired, const std::source_location loc=std::source_location::current())
 See with_tolerance::assert_allclose.
template<memory::IFieldView TFieldView>
void assert_allclose (const TFieldView &actual, const TFieldView &desired, bool withGhostLayers=false, const std::source_location loc=std::source_location::current())
 See with_tolerance::assert_allclose.

Function Documentation

◆ assert_allclose() [1/3]

template<std::ranges::range R1, std::ranges::range R2>
void walberla::v8::testing::assert_allclose ( const R1 & actual,
const R2 & desired,
const std::source_location loc = std::source_location::current() )

◆ assert_allclose() [2/3]

template<std::ranges::sized_range R1>
void walberla::v8::testing::assert_allclose ( const R1 & actual,
std::ranges::range_value_t< R1 > desired,
const std::source_location loc = std::source_location::current() )

◆ assert_allclose() [3/3]

template<memory::IFieldView TFieldView>
void walberla::v8::testing::assert_allclose ( const TFieldView & actual,
const TFieldView & desired,
bool withGhostLayers = false,
const std::source_location loc = std::source_location::current() )

◆ assert_close()

template<std::floating_point T>
void walberla::v8::testing::assert_close ( T actual,
T desired,
const std::source_location loc = std::source_location::current() )
inline

◆ assert_range_inequal()

template<std::ranges::range R1, std::ranges::range R2>
void walberla::v8::testing::assert_range_inequal ( R1 actual,
R2 desired,
const std::source_location loc = std::source_location::current() )