stator
A math, geometry, and utility library
Classes | Public Member Functions | Static Public Member Functions | List of all members
UnitTests Class Reference

#include <unit_test.hpp>

Public Member Functions

 UnitTests ()
 
void check (bool l, std::string file, int line, std::string Lname)
 
template<class L , class R , class Tol_t >
void check_close (L l, R r, std::string file, int line, std::string Lname, std::string Rname, Tol_t tol)
 
template<class L , class R >
void check_equal (const L &l, const R &r, std::string file, int line, std::string Lname, std::string Rname)
 
template<class T , class Tol_t >
void check_small (T l, std::string file, int line, std::string Lname, Tol_t tol)
 
void error (std::string msg, std::string file, int line)
 
void register_test (std::string name, std::function< void()> cb)
 
int run_tests ()
 

Static Public Member Functions

static UnitTestsget ()
 

Detailed Description

Definition at line 29 of file unit_test.hpp.

Constructor & Destructor Documentation

◆ UnitTests()

UnitTests::UnitTests ( )
inline

Definition at line 31 of file unit_test.hpp.

Member Function Documentation

◆ check()

void UnitTests::check ( bool  l,
std::string  file,
int  line,
std::string  Lname 
)
inline

Definition at line 74 of file unit_test.hpp.

◆ check_close()

template<class L , class R , class Tol_t >
void UnitTests::check_close ( l,
r,
std::string  file,
int  line,
std::string  Lname,
std::string  Rname,
Tol_t  tol 
)
inline

Definition at line 82 of file unit_test.hpp.

◆ check_equal()

template<class L , class R >
void UnitTests::check_equal ( const L &  l,
const R &  r,
std::string  file,
int  line,
std::string  Lname,
std::string  Rname 
)
inline

Definition at line 67 of file unit_test.hpp.

◆ check_small()

template<class T , class Tol_t >
void UnitTests::check_small ( l,
std::string  file,
int  line,
std::string  Lname,
Tol_t  tol 
)
inline

Definition at line 97 of file unit_test.hpp.

◆ error()

void UnitTests::error ( std::string  msg,
std::string  file,
int  line 
)
inline

Definition at line 104 of file unit_test.hpp.

◆ get()

static UnitTests& UnitTests::get ( )
inlinestatic

Definition at line 33 of file unit_test.hpp.

◆ register_test()

void UnitTests::register_test ( std::string  name,
std::function< void()>  cb 
)
inline

Definition at line 38 of file unit_test.hpp.

◆ run_tests()

int UnitTests::run_tests ( )
inline

Definition at line 42 of file unit_test.hpp.


The documentation for this class was generated from the following file: