|
void | setup (const std::string &moduleName, int argc=0, const char **argv=nullptr) |
| Setup error checking module.
|
|
void | terminate (bool exit=false) |
| Terminate the error testing environment.
|
|
| err_context (std::string moduleName, int argc=0, const char **argv=nullptr) |
| Setup the error checking module.
|
|
| ~err_context () |
| Terminate the error checking module.
|
|
void | assert (const std::string &name, bool exp, std::string description="", bool quiet=false) |
| Assert that an expression is true.
|
|
template<typename Function , typename InputType > |
void | errno_value (const std::string &name, Function f, InputType x, int expected_errno, bool quiet=false) |
| Check errno value after function call.
|
|
template<typename Function , typename InputType > |
void | errno_value (const std::string &name, Function f, std::function< InputType()> generator, int expected_errno, bool quiet=false) |
| Check errno value after function call.
|
|
template<typename Function , typename InputType > |
void | errno_flags (const std::string &name, Function f, InputType x, std::vector< int > &expected_flags, bool quiet=false) |
| Check the value of errno after a function call, comparing to multiple expected flags which should all be set.
|
|
template<typename Function , typename InputType > |
void | errno_flags (const std::string &name, Function f, std::function< InputType()> generator, std::vector< int > &expected_flags, bool quiet=false) |
| Check the value of errno after a function call, comparing to multiple expected flags which should all be set.
|
|
template<typename Function , typename InputType > |
void | throws (const std::string &name, Function f, InputType x, bool quiet=false) |
| Check that an exception of any type is thrown during a function call with the given input.
|
|
template<typename Function , typename InputType > |
void | throws (const std::string &name, Function f, std::function< InputType()> generator, bool quiet=false) |
| Check that an exception of any type is thrown during a function call with a generated input.
|
|
template<typename ExceptionType , typename Function , typename InputType > |
void | throws (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.
|
|
template<typename ExceptionType , typename Function , typename InputType > |
void | throws (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.
|
|
std::vector< assert_result > | get_assertion (const std::string &name) |
| Get the results of an assertion by name or label.
|
|
assert_result | get_assertion (const std::string &name, unsigned int i) |
| Get a single result of an assertion by label and index.
|
|
std::vector< errno_result > | get_errno (const std::string &name) |
| Get the results of errno checking by name or label.
|
|
errno_result | get_errno (const std::string &name, unsigned int i) |
| Get a single result of errno checking by label and index.
|
|
std::vector< exception_result > | get_exception (const std::string &name) |
| Get the results of exception checking by name or label.
|
|
exception_result | get_exception (const std::string &name, unsigned int i) |
| Get a single result of exception checking by label and index.
|
|
Error checking context, for assertions and exception checking.