capi_tests_common.h File Reference

Declaration of functions and macros for better tests error output. More...

#include <usl/error/err_codes.h>
#include "../labbCAN_Bus_API.h"
#include <string>
+ Include dependency graph for capi_tests_common.h:

Macros

#define _str(s)   #s
 
#define CAPI_CHECK_ERR_NOERR(_ret_)   BOOST_CHECK_MESSAGE((_ret_) >= ERR_NOERR, (((_ret_) >= ERR_NOERR) ? _str(_ret_) : capiErrorString(_ret_)));
 Use this macro to test return codes of functions that return TErrCode The returned error code must be greater or equal ERR_NOERR.
 
#define CAPI_REQUIRE_ERR_NOERR(_ret_)   BOOST_REQUIRE_MESSAGE((_ret_) >= ERR_NOERR, (((_ret_) >= ERR_NOERR) ? _str(_ret_) : capiErrorString(_ret_)));
 
#define xstr(s)   _str(s)
 

Functions

std::string capiErrorString (long ErrCode)
 Converts error code into error string with extended error string appended.
 

Detailed Description

Declaration of functions and macros for better tests error output.

Author
Uwe Kindler
Date
12.05.2021