The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros
acutest_helpers.h File Reference

Type specific TEST_CHECK macros for acutest. More...

Go to the source code of this file.

Macros

#define TEST_CHECK_LEN(_got, _exp)
 
#define TEST_CHECK_RET(_got, _exp)
 
#define TEST_CHECK_SLEN(_got, _exp)
 
#define TEST_CHECK_SLEN_RETURN(_got, _exp)
 
#define TEST_CHECK_STRCMP(_got, _exp)
 

Detailed Description

Type specific TEST_CHECK macros for acutest.

Definition in file acutest_helpers.h.

Macro Definition Documentation

◆ TEST_CHECK_LEN

#define TEST_CHECK_LEN (   _got,
  _exp 
)
Value:
do { \
size_t _our_got = (_got); \
TEST_CHECK_(_exp == _our_got, "%s", #_got); \
TEST_MSG("Expected length : %zu", (size_t)_exp); \
TEST_MSG("Got length : %zu", (size_t)_our_got); \
} while(0)

Definition at line 30 of file acutest_helpers.h.

◆ TEST_CHECK_RET

#define TEST_CHECK_RET (   _got,
  _exp 
)
Value:
do { \
int _our_got = (_got); \
TEST_CHECK_(_exp == _our_got, "%s", #_got); \
TEST_MSG("Expected ret : %"PRId64, (int64_t)_exp); \
TEST_MSG("Got ret : %"PRId64, (int64_t)_our_got); \
} while(0)

Definition at line 55 of file acutest_helpers.h.

◆ TEST_CHECK_SLEN

#define TEST_CHECK_SLEN (   _got,
  _exp 
)
Value:
do { \
ssize_t _our_got = (_got); \
TEST_CHECK_(_exp == _our_got, "%s", #_got); \
TEST_MSG("Expected length : %zd", (ssize_t)_exp); \
TEST_MSG("Got length : %zd", (ssize_t)_our_got); \
} while(0)
long int ssize_t
Definition: merged_model.c:24

Definition at line 38 of file acutest_helpers.h.

◆ TEST_CHECK_SLEN_RETURN

#define TEST_CHECK_SLEN_RETURN (   _got,
  _exp 
)
Value:
do { \
ssize_t _our_got = (_got); \
TEST_CHECK_(_exp == _our_got, "%s", #_got); \
TEST_MSG("Expected length : %zd", (ssize_t)_exp); \
TEST_MSG("Got length : %zd", (ssize_t)_our_got); \
if (_exp != _our_got) return; \
} while(0)

Definition at line 46 of file acutest_helpers.h.

◆ TEST_CHECK_STRCMP

#define TEST_CHECK_STRCMP (   _got,
  _exp 
)
Value:
do { \
char const *_our_got = (_got); \
TEST_CHECK_(((_exp) != NULL) && ((_got) != NULL) && (strcmp(_exp, _our_got) == 0), "%s", #_got); \
TEST_MSG("Expected : \"%s\"", _exp); \
TEST_MSG("Got : \"%s\"", _our_got); \
} while(0)

Definition at line 63 of file acutest_helpers.h.