Defines | Variables
curlcheck.h File Reference
#include "test.h"
Include dependency graph for curlcheck.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define abort_if(expr, msg)
#define abort_test(msg)
#define abort_unless(expr, msg)
#define fail(msg)
#define fail_if(expr, msg)
#define fail_unless(expr, msg)
#define UNITTEST_START
#define UNITTEST_STOP
#define verify_memory(dynamic, check, len)

Variables

int unitfail

Define Documentation

#define abort_if (   expr,
  msg 
)
Value:
if(expr) {                                                  \
    fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n",   \
            __FILE__, __LINE__, #expr, msg);                  \
    unitfail++;                                               \
    goto unit_test_abort;                                     \
  }

Definition at line 58 of file curlcheck.h.

#define abort_test (   msg)
Value:
do {                                  \
    fprintf(stderr, "%s:%d test aborted: '%s'\n",             \
            __FILE__, __LINE__, msg);                         \
    unitfail++;                                               \
    goto unit_test_abort;                                     \
  } WHILE_FALSE

Definition at line 74 of file curlcheck.h.

#define abort_unless (   expr,
  msg 
)
Value:
if(!(expr)) {                                                \
    fprintf(stderr, "%s:%d Abort assertion '%s' failed: %s\n", \
            __FILE__, __LINE__, #expr, msg);                   \
    unitfail++;                                                \
    goto unit_test_abort;                                      \
  }

Definition at line 66 of file curlcheck.h.

#define fail (   msg)
Value:
do {                                                 \
    fprintf(stderr, "%s:%d test failed: '%s'\n",                       \
            __FILE__, __LINE__, msg);                                  \
    unitfail++;                                                        \
  } WHILE_FALSE

Definition at line 50 of file curlcheck.h.

#define fail_if (   expr,
  msg 
)
Value:
if(expr) {                                            \
    fprintf(stderr, "%s:%d Assertion '%s' met: %s\n",   \
            __FILE__, __LINE__, #expr, msg);            \
    unitfail++;                                         \
  }

Definition at line 25 of file curlcheck.h.

#define fail_unless (   expr,
  msg 
)
Value:
if(!(expr)) {                                          \
    fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
            __FILE__, __LINE__, #expr, msg);             \
    unitfail++;                                          \
  }

Definition at line 32 of file curlcheck.h.

#define UNITTEST_START
Value:
int test(char *arg)                           \
  {                                             \
    (void)arg;                                  \
    if(unit_setup()) {                          \
      fail("unit_setup() failure");             \
    }                                           \
    else {

Definition at line 85 of file curlcheck.h.

#define UNITTEST_STOP
Value:
goto unit_test_abort; /* avoid warning */   \
unit_test_abort:                                \
    unit_stop();                                \
  }                                             \
  return unitfail;                              \
  }

Definition at line 94 of file curlcheck.h.

#define verify_memory (   dynamic,
  check,
  len 
)
Value:
if(dynamic && memcmp(dynamic, check, len)) {                              \
    fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n",  \
            __FILE__, __LINE__, len, hexdump((unsigned char *)check, len)); \
    fprintf(stderr, "%s:%d the same as '%s'\n",                             \
            __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len));    \
    unitfail++;                                                             \
  }

Definition at line 39 of file curlcheck.h.


Variable Documentation

int unitfail


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:08