Macros | 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.

Macros

#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
 

Macro Definition Documentation

◆ abort_if

#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 59 of file curlcheck.h.

◆ abort_test

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

Definition at line 75 of file curlcheck.h.

◆ abort_unless

#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 67 of file curlcheck.h.

◆ fail

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

Definition at line 51 of file curlcheck.h.

◆ fail_if

#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.

◆ fail_unless

#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.

◆ UNITTEST_START

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

Definition at line 86 of file curlcheck.h.

◆ UNITTEST_STOP

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

Definition at line 95 of file curlcheck.h.

◆ verify_memory

#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((const unsigned char *)check, len)); \
fprintf(stderr, "%s:%d the same as '%s'\n", __FILE__, __LINE__, \
hexdump((const unsigned char *)dynamic, len)); \
unitfail++; \
}

Definition at line 39 of file curlcheck.h.

Variable Documentation

◆ unitfail

int unitfail
len
size_t len
Definition: curl_sasl.c:84
test
int test(char *URL)
Definition: lib1500.c:30
hexdump
char * hexdump(const unsigned char *buffer, size_t len)
Definition: first.c:119
unit_setup
static CURLcode unit_setup(void)
Definition: unit1300.c:37
WHILE_FALSE
#define WHILE_FALSE
Definition: curl_setup_once.h:356
unitfail
int unitfail


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sun May 15 2022 02:25:01