Functions
Marmot::Testing Namespace Reference

Functions

bool checkIfEqual (const double a, const double b, const double tol=1e-15)
 
bool checkIfEqual (const autodiff::dual a, const autodiff::dual b, const double tol=1e-15)
 
bool checkIfEqual (const std::complex< double > a, const std::complex< double > b, const double tol=1e-15)
 
std::string getString (const double a)
 
std::string getString (const autodiff::dual a)
 
template<typename T >
bool checkIfEqual (const Eigen::Matrix< T, -1, -1 > &a, const Eigen::Matrix< T, -1, -1 > &b, const double tol=1e-15)
 
template<typename T , long int... Rest>
bool checkIfEqual (const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &a, const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &b, const double tol=1e-15)
 
void throwExceptionOnFailure (const bool condition, const std::string &message="")
 
void executeTestsAndCollectExceptions (const std::vector< std::function< void() > > &testFunctions)
 

Function Documentation

◆ checkIfEqual() [1/5]

bool Marmot::Testing::checkIfEqual ( const double  a,
const double  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [2/5]

bool Marmot::Testing::checkIfEqual ( const autodiff::dual  a,
const autodiff::dual  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [3/5]

bool Marmot::Testing::checkIfEqual ( const std::complex< double >  a,
const std::complex< double >  b,
const double  tol = 1e-15 
)

◆ getString() [1/2]

std::string Marmot::Testing::getString ( const double  a)

◆ getString() [2/2]

std::string Marmot::Testing::getString ( const autodiff::dual  a)

◆ checkIfEqual() [4/5]

template<typename T >
bool Marmot::Testing::checkIfEqual ( const Eigen::Matrix< T, -1, -1 > &  a,
const Eigen::Matrix< T, -1, -1 > &  b,
const double  tol = 1e-15 
)

◆ checkIfEqual() [5/5]

template<typename T , long int... Rest>
bool Marmot::Testing::checkIfEqual ( const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &  a,
const Eigen::TensorFixedSize< T, Eigen::Sizes< Rest... > > &  b,
const double  tol = 1e-15 
)

◆ throwExceptionOnFailure()

void Marmot::Testing::throwExceptionOnFailure ( const bool  condition,
const std::string &  message = "" 
)

◆ executeTestsAndCollectExceptions()

void Marmot::Testing::executeTestsAndCollectExceptions ( const std::vector< std::function< void() > > &  testFunctions)