PhoenixSerializer  3.0.0
PhoenixSerializer is a framework to save/load/serialize/deserialize data
Loading...
Searching...
No Matches
data_stream_assert.h File Reference
#include <string>
Include dependency graph for data_stream_assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PHOENIX_ASSERT_FUNCTION   __func__
#define phoenix_serialize_assert(isOk)

Functions

void phoenix_serialize_assertFull (bool isOk, const std::string &assertion, const std::string &fileName, size_t line, const std::string &functionName)
 Check if the assertion isOk is true, raise an assertion if isOk is false.

Macro Definition Documentation

◆ PHOENIX_ASSERT_FUNCTION

#define PHOENIX_ASSERT_FUNCTION   __func__

Definition at line 13 of file data_stream_assert.h.

◆ phoenix_serialize_assert

#define phoenix_serialize_assert ( isOk)
Value:
phoenix_serialize_assertFull(isOk, #isOk, __FILE__, __LINE__, PHOENIX_ASSERT_FUNCTION)
void phoenix_serialize_assertFull(bool isOk, const std::string &assertion, const std::string &fileName, size_t line, const std::string &functionName)
Check if the assertion isOk is true, raise an assertion if isOk is false.
#define PHOENIX_ASSERT_FUNCTION

Definition at line 16 of file data_stream_assert.h.

Function Documentation

◆ phoenix_serialize_assertFull()

void phoenix_serialize_assertFull ( bool isOk,
const std::string & assertion,
const std::string & fileName,
size_t line,
const std::string & functionName )

Check if the assertion isOk is true, raise an assertion if isOk is false.

Parameters
isOk: assertion which has to be true
assertion: text assertion (convertion of isOk expression into text)
fileName: name of the file where the test is called
line: line of the file where the test is called
functionName: name of the function where the problem happends

Definition at line 22 of file data_stream_assert.cpp.

22 {
23 if(!isOk) {
24 __assert_fail(assertion.c_str(), fileName.c_str(), line, functionName.c_str()); // GCOVR_EXCL_LINE aborts the program, cannot be covered by a passing test
25 }
26}

References phoenix_serialize_assertFull().

Referenced by phoenix_serialize_assertFull().

Here is the call graph for this function:
Here is the caller graph for this function: