Chebyshev
Unit testing for scientific software
Loading...
Searching...
No Matches
chebyshev::err Namespace Reference

Error checking module. More...

Classes

class  assert_result
 Result of assertion checking of a function. More...
 
class  err_context
 Error checking context, for assertions and exception checking. More...
 
class  err_settings
 Settings of the error testing module, used in err_context. More...
 
class  errno_result
 Result of errno checking of a function. More...
 
class  exception_result
 Result of exception checking of a function. More...
 

Functions

err_context make_context (const std::string &moduleName, int argc=0, const char **argv=nullptr)
 Construct an error checking context with the given parameters.
 

Detailed Description

Error checking module.

This module provides functions to test error reporting with different methods. Assertions are checked with err::assert, while the value of errno after a function call can be checked using err::errno_value and the throwing of exceptions can be checked using check_exception.

Function Documentation

◆ make_context()

err_context chebyshev::err::make_context ( const std::string &  moduleName,
int  argc = 0,
const char **  argv = nullptr 
)

Construct an error checking context with the given parameters.

Parameters
moduleNameName of the module under test.
argcThe number of command line arguments.
argvAn array of command line arguments as C-like strings.