Chebyshev
Unit testing for scientific software
err.h File Reference

Error checking module. More...

#include <vector>
#include <cstdlib>
#include <iostream>
#include "./core/common.h"
#include "./core/random.h"
#include "./err/err_structures.h"

Go to the source code of this file.

Classes

class  chebyshev::err::err_settings
 Global settings of the error testing module. More...
 
class  chebyshev::err::err_results
 error checking More...
 

Namespaces

 chebyshev
 General namespace of the framework.
 
 chebyshev::err
 Error checking module.
 

Functions

void chebyshev::err::setup (const std::string &moduleName, int argc=0, const char **argv=nullptr)
 Setup error checking module. More...
 
void chebyshev::err::terminate (bool exit=true)
 Terminate the error testing environment. More...
 
void chebyshev::err::assert (const std::string &name, bool exp, std::string description="", bool quiet=false)
 Assert that an expression is true. More...
 
template<typename Function , typename InputType >
void chebyshev::err::check_errno (const std::string &name, Function f, InputType x, int expected_errno, bool quiet=false)
 Check errno value after function call. More...
 
template<typename Function , typename InputType >
void chebyshev::err::check_errno (const std::string &name, Function f, std::function< InputType()> generator, int expected_errno, bool quiet=false)
 Check errno value after function call. More...
 
template<typename Function , typename InputType >
void chebyshev::err::check_errno (const std::string &name, Function f, InputType x, std::vector< int > &expected_flags, bool quiet=false)
 Check errno value after function call. More...
 
template<typename Function , typename InputType >
void chebyshev::err::check_errno (const std::string &name, Function f, std::function< InputType()> generator, std::vector< int > &expected_flags, bool quiet=false)
 Check errno value after function call. More...
 
template<typename Function , typename InputType >
void chebyshev::err::check_exception (const std::string &name, Function f, InputType x, bool quiet=false)
 Check that an exception is thrown during a function call. More...
 
template<typename Function , typename InputType >
void chebyshev::err::check_exception (const std::string &name, Function f, std::function< InputType()> generator, bool quiet=false)
 Check that an exception is thrown during a function call. More...
 
template<typename ExceptionType , typename Function , typename InputType >
void chebyshev::err::check_exception (const std::string &name, Function f, InputType x, bool quiet=false)
 Check that an exception is thrown during a function call and that the type of the exception is correct. More...
 
template<typename ExceptionType , typename Function , typename InputType >
void chebyshev::err::check_exception (const std::string &name, Function f, std::function< InputType()> generator, bool quiet=false)
 Check that an exception is thrown during a function call and that the type of the exception is correct. More...
 

Variables

struct chebyshev::err::err_settings chebyshev::err::settings
 
struct chebyshev::err::err_results chebyshev::err::results
 

Detailed Description

Error checking module.