eckit::testing namespace

Classes

class TestException
class SetEnv
class Test
A test is defined by a description and a function pointer.
class TestRegister
Tests are registered using a static object, that is initialised before main()
template<typename T>
class ArrayView

Enums

enum TestVerbosity { Silent = 0, Summary = 1, AllFailures = 2 }
enum InitEckitMain { NoInitEckitMain = 0, DoInitEckitMain = 1 }

Functions

auto specification() -> std::vector<Test>&
template<typename T>
static auto make_view(const T* data, size_t size) -> ArrayView<T>
template<typename T>
static auto make_view(const T* begin, const T* end) -> ArrayView<T>
template<typename T>
static auto make_view(const std::vector<T>& source) -> ArrayView<T>
template<typename U>
static auto is_approximately_equal(const ArrayView<U> a, const ArrayView<U> b, const U epsilon) -> bool
template<typename U>
static auto is_approximately_equal(const ArrayView<U> a, const std::vector<U> b, const U epsilon) -> bool
template<typename U>
static auto is_approximately_equal(const std::vector<U> a, const ArrayView<U> b, const U epsilon) -> bool
template<typename U>
static auto is_approximately_equal(const std::vector<U> a, const std::vector<U> b, const U epsilon) -> bool
template<typename U>
auto operator==(const std::vector<U>& lhs, const ArrayView<U>& rhs) -> bool
template<typename U>
auto operator!=(const std::vector<U>& lhs, const ArrayView<U>& rhs) -> bool
auto run(std::vector<Test>& tests, TestVerbosity v = AllFailures) -> int
auto run_tests_main(std::vector<Test>& tests, int argc, char* argv[], bool initEckitMain = true) -> int
auto run_tests(std::vector<Test>& tests, int argc, char* argv[]) -> int
auto run_tests(int argc, char* argv[], bool initEckitMain = true) -> int

Enum documentation

enum eckit::testing::TestVerbosity

enum eckit::testing::InitEckitMain

Function documentation

std::vector<Test>& eckit::testing::specification()

template<typename T>
static ArrayView<T> eckit::testing::make_view(const T* data, size_t size)

template<typename T>
static ArrayView<T> eckit::testing::make_view(const T* begin, const T* end)

template<typename T>
static ArrayView<T> eckit::testing::make_view(const std::vector<T>& source)

template<typename U>
static bool eckit::testing::is_approximately_equal(const ArrayView<U> a, const ArrayView<U> b, const U epsilon)

template<typename U>
static bool eckit::testing::is_approximately_equal(const ArrayView<U> a, const std::vector<U> b, const U epsilon)

template<typename U>
static bool eckit::testing::is_approximately_equal(const std::vector<U> a, const ArrayView<U> b, const U epsilon)

template<typename U>
static bool eckit::testing::is_approximately_equal(const std::vector<U> a, const std::vector<U> b, const U epsilon)

template<typename U>
bool eckit::testing::operator==(const std::vector<U>& lhs, const ArrayView<U>& rhs)

template<typename U>
bool eckit::testing::operator!=(const std::vector<U>& lhs, const ArrayView<U>& rhs)

int eckit::testing::run(std::vector<Test>& tests, TestVerbosity v = AllFailures)

int eckit::testing::run_tests_main(std::vector<Test>& tests, int argc, char* argv[], bool initEckitMain = true)

int eckit::testing::run_tests(std::vector<Test>& tests, int argc, char* argv[])

int eckit::testing::run_tests(int argc, char* argv[], bool initEckitMain = true)