Assert.hpp File Reference
Include dependency graph for Assert.hpp:
This graph shows which files directly or indirectly include this file:

Macros

#define ASSERT_EQ(LEFT, ...)
 
#define ASSERT_NE(LEFT, ...)
 
#define ASSERT_NEAR(LEFT, RIGHT, ...)
 
#define ASSERT_LT(LEFT, ...)
 
#define ASSERT_LE(LEFT, ...)
 
#define ASSERT_GT(LEFT, ...)
 
#define ASSERT_GE(LEFT, ...)
 
#define ASSERT_TRUE(...)
 
#define ASSERT_FALSE(...)
 
#define ASSERT_ANY_THROW(...)
 
#define ASSERT_THROW(TYPE, ...)
 

Macro Definition Documentation

#define ASSERT_ANY_THROW (   ...)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_ANY_THROW_HELPER(__FILE__, __LINE__, __VA_ARGS__, std::string(), std::string()))

ASSERT_ANY_THROW(INVOKE, MESSAGE) indicate about if any exception will be not thrown from INVOKE and immediately end test.

To failure information is included:

  • file location
  • line number
  • INVOKE stringified expression,
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_EQ (   LEFT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_EQ_HELPER(__FILE__, __LINE__, LEFT, __VA_ARGS__, std::string(), std::string()))

ASSERT_EQ(LEFT, RIGHT, MESSAGE) indicate about failure if LEFT and RIGHT are not equal(using: !(LEFT == RIGHT)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_FALSE (   ...)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_FALSE_HELPER(__FILE__, __LINE__, __VA_ARGS__, std::string(), std::string()))

ASSERT_FALSE(EXPR, MESSAGE) indicate about failure if EXPR is true(using: !(EXPR == false)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • EXPR stringified expression,
  • EXPR value
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_GE (   LEFT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_GE_HELPER(__FILE__, __LINE__, LEFT, __VA_ARGS__, std::string(), std::string()))

ASSERT_GE(LEFT, RIGHT, MESSAGE) indicate about failure if LEFT is not greater or equal RIGHT(using: !(LEFT >= RIGHT)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_GT (   LEFT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_GT_HELPER(__FILE__, __LINE__, LEFT, __VA_ARGS__, std::string(), std::string()))

ASSERT_GT(LEFT, RIGHT, MESSAGE) indicate about failure if LEFT is not greater than RIGHT(using: !(LEFT > RIGHT)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_LE (   LEFT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_LE_HELPER(__FILE__, __LINE__, LEFT, __VA_ARGS__, std::string(), std::string()))

ASSERT_LE(LEFT, RIGHT, MESSAGE) indicate about failure if LEFT is not less or equal RIGHT(using: !(LEFT <= RIGHT)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_LT (   LEFT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_LT_HELPER(__FILE__, __LINE__, LEFT, __VA_ARGS__, std::string(), std::string()))

ASSERT_LT(LEFT, RIGHT, MESSAGE) indicate about failure if LEFT is not less than RIGHT(using: !(LEFT < RIGHT)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_NE (   LEFT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_NE_HELPER(__FILE__, __LINE__, LEFT, __VA_ARGS__, std::string(), std::string()))

ASSERT_NE(LEFT, RIGHT, MESSAGE) indicate about failure if LEFT and RIGHT are equal(using: !(LEFT != RIGHT)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_NEAR (   LEFT,
  RIGHT,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_NEAR_HELPER(__FILE__, __LINE__, LEFT, RIGHT, __VA_ARGS__, std::string(), std::string()))

ASSERT_NEAR(LEFT, RIGHT, PRECISION, MESSAGE) indicate about failure if LEFT and RIGHT are not near each other and immediately end test.

To failure information is included:

  • file location
  • line number
  • LEFT and RIGHT stringified expression,
  • LEFT and RIGHT value if convertiable to string (by std::ostringstream interface)
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_THROW (   TYPE,
  ... 
)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_THROW_HELPER(__FILE__, __LINE__, TYPE, __VA_ARGS__, std::string(), std::string()))

ASSERT_THROW(TYPE, INVOKE, MESSAGE) indicate about if any exception will be not thrown from INVOKE or thrown exception type is not equal to ASSERTed type. In case of failure immediately end test.

To failure information is included:

  • file location
  • line number
  • TYPE and INVOKE stringified expression,
  • optional message
Note
message parameter is optional - if not provided empty will be used
#define ASSERT_TRUE (   ...)
Value:
RILI_ASSERT_VA_ARGS_MACRO_EXPAND( \
RILI_ASSERT_TRUE_HELPER(__FILE__, __LINE__, __VA_ARGS__, std::string(), std::string()))

ASSERT_TRUE(EXPR, MESSAGE) indicate about failure if EXPR is true(using: !(EXPR == true)) and immediately end test.

To failure information is included:

  • file location
  • line number
  • EXPR stringified expression,
  • EXPR value
  • optional message
Note
message parameter is optional - if not provided empty will be used