[ CCUnit project page ] |  | [ CCUnit home page ]

Defines | Typedefs | Functions

# CCUnitAssert.h File Reference

Assert functions and macros. More...

`#include <ccunit/CCUnitConfig.h>`
Include dependency graph for CCUnitAssert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | CCUNIT_HAVE_U_CHAR
#define | CCUNIT_HAVE_U_INT
#define | CCUNIT_HAVE_U_SHORT
#define | CCUNIT_HAVE_U_LONG
#define | CCUNIT_ASSERT(COND) ccunit_assert (__FILE__, __LINE__, COND, #COND)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_COND(TYP, CONDITION, EXPECT, ACTUAL)
| Asserts that a condition is true.
Assert Macros
The assert test macros.
#define | CCUNIT_ASSERT_TEST(TYP, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_INT(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (int, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_UINT(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (u_int, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_LONG(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (long, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_ULONG(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (u_long, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_SHORT(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (short, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_USHORT(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (u_short, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_DOUBLE(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (double, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_FLOAT(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (float, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_PTR(EXPECT, OP, ACTUAL) CCUNIT_ASSERT_TEST (_ccunit_ptr_t, EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_STR(EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_NSTR(EXPECT, OP, ACTUAL, N)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_CASE_STR(EXPECT, OP, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_CASE_NSTR(EXPECT, OP, ACTUAL, N)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_TEST_OBJ(EXPECT, OP, ACTUAL, TOSTR)
| Asserts that a condition is true.
Assert Condition Macros
The assert condition macros.
#define | CCUNIT_ASSERT_NULL(ACTUAL) CCUNIT_ASSERT_TEST_PTR(NULL, ==, ACTUAL)
| Asserts that a pointer is NULL.
#define | CCUNIT_ASSERT_NOT_NULL(ACTUAL) CCUNIT_ASSERT_TEST_PTR(NULL, !=, ACTUAL)
| Asserts that a pointer is not NULL.
#define | CCUNIT_ASSERT_EQ_INT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_INT (EXPECT, ==, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_NE_INT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_INT (EXPECT, !=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LT_INT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_INT (EXPECT, <, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LE_INT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_INT (EXPECT, <=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GT_INT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_INT (EXPECT, >, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GE_INT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_INT (EXPECT, >=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_EQ_UINT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_UINT (EXPECT, ==, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_NE_UINT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_UINT (EXPECT, !=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LT_UINT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_UINT (EXPECT, <, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LE_UINT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_UINT (EXPECT, <=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GT_UINT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_UINT (EXPECT, >, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GE_UINT(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_UINT (EXPECT, >=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_EQ_STR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_STR (EXPECT, ==, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_NE_STR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_STR (EXPECT, !=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LT_STR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_STR (EXPECT, <, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LE_STR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_STR (EXPECT, <=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GT_STR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_STR (EXPECT, >, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GE_STR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_STR (EXPECT, >=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_EQ_PTR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_PTR (EXPECT, ==, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_NE_PTR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_PTR (EXPECT, !=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LT_PTR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_PTR (EXPECT, <, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_LE_PTR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_PTR (EXPECT, <=, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GT_PTR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_PTR (EXPECT, >, ACTUAL)
| Asserts that a condition is true.
#define | CCUNIT_ASSERT_GE_PTR(EXPECT, ACTUAL) CCUNIT_ASSERT_TEST_PTR (EXPECT, >=, ACTUAL)
| Asserts that a condition is true.
## Typedefs
typedef unsigned char | u_char
| u_char
typedef unsigned int | u_int
| u_int
typedef unsigned short | u_short
| u_short
typedef unsigned long | u_long
| u_long
typedef const char * | _ccunit_str_t
| string type
typedef const void * | _ccunit_ptr_t
| pointer type
typedef const void * | _ccunit_obj_t
| object type
## Functions
void | ccunit_assert (const char *file, unsigned int line, bool condition, const char *condstr)
| Asserts that a condition is true.
## Declare assert test types
#define | DCL_CCUNIT_ASSERT_TEST_TYPE(TYP)
| Asserts that a condition is true.
typedef char *(* | ccunit_toString_t )(_ccunit_obj_t)
| DCL_CCUNIT_ASSERT_TEST_TYPE (char)
| DCL_CCUNIT_ASSERT_TEST_TYPE (u_char)
| DCL_CCUNIT_ASSERT_TEST_TYPE (int)
| DCL_CCUNIT_ASSERT_TEST_TYPE (u_int)
| DCL_CCUNIT_ASSERT_TEST_TYPE (short)
| DCL_CCUNIT_ASSERT_TEST_TYPE (u_short)
| DCL_CCUNIT_ASSERT_TEST_TYPE (long)
| DCL_CCUNIT_ASSERT_TEST_TYPE (u_long)
| DCL_CCUNIT_ASSERT_TEST_TYPE (float)
| DCL_CCUNIT_ASSERT_TEST_TYPE (double)
| DCL_CCUNIT_ASSERT_TEST_TYPE (_ccunit_str_t)
| DCL_CCUNIT_ASSERT_TEST_TYPE (_ccunit_ptr_t)
void | ccunit_assert_test__ccunit_obj_t (const char *file, unsigned int line, bool cond, const char *condstr, _ccunit_obj_t expect, _ccunit_obj_t acutal, ccunit_toString_t)

## Detailed Description

Assert functions and macros.

| hosts this site. |  | Send comments to: CCUnit Developer |