Apache HTTPD
Macros
test_apu.h File Reference
#include "apr_strings.h"
#include "apr_time.h"

Go to the source code of this file.

Macros

#define TEST_EQ(str, func, value, good, bad)
 
#define TEST_NEQ(str, func, value, good, bad)
 
#define TEST_STATUS(str, func, testmacro, good, bad)
 
#define STD_TEST_NEQ(str, func)    TEST_NEQ(str, func, APR_SUCCESS, "OK", "Failed");
 
#define PRINT_ERROR(rv)
 
#define MSG_AND_EXIT(msg)
 
#define TIME_FUNCTION(time, function)
 

Macro Definition Documentation

◆ MSG_AND_EXIT

#define MSG_AND_EXIT (   msg)
Value:
printf("%s\n", msg); \
exit (-1);
apr_size_t size

Definition at line 88 of file test_apu.h.

◆ PRINT_ERROR

#define PRINT_ERROR (   rv)
Value:
{ \
char errmsg[200]; \
fprintf(stderr, "Error was %d : %s\n", rv, \
apr_strerror(rv, (char*)&errmsg, 200)); \
exit(-1); \
}

Definition at line 80 of file test_apu.h.

◆ STD_TEST_NEQ

#define STD_TEST_NEQ (   str,
  func 
)     TEST_NEQ(str, func, APR_SUCCESS, "OK", "Failed");

Definition at line 77 of file test_apu.h.

◆ TEST_EQ

#define TEST_EQ (   str,
  func,
  value,
  good,
  bad 
)
Value:
printf("%-60s", str); \
{ \
if ((rv = func) == value){ \
char errmsg[200]; \
printf("%s\n", bad); \
fprintf(stderr, "Error was %d : %s\n", rv, \
apr_strerror(rv, (char*)&errmsg, 200)); \
exit(-1); \
} \
printf("%s\n", good); \
}
const char * value
Definition apr_env.h:51
int apr_status_t
Definition apr_errno.h:44
apr_interval_time_t apr_pollcb_cb_t func
Definition apr_poll.h:422
#define bad(x)
Definition sdbm.c:50
#define str

Definition at line 35 of file test_apu.h.

◆ TEST_NEQ

#define TEST_NEQ (   str,
  func,
  value,
  good,
  bad 
)
Value:
printf("%-60s", str); \
{ \
if ((rv = func) != value){ \
char errmsg[200]; \
printf("%s\n", bad); \
fprintf(stderr, "Error was %d : %s\n", rv, \
apr_strerror(rv, (char*)&errmsg, 200)); \
exit(-1); \
} \
printf("%s\n", good); \
}

Definition at line 49 of file test_apu.h.

◆ TEST_STATUS

#define TEST_STATUS (   str,
  func,
  testmacro,
  good,
  bad 
)
Value:
printf("%-60s", str); \
{ \
if (!testmacro(rv)) { \
char errmsg[200]; \
printf("%s\n", bad); \
fprintf(stderr, "Error was %d : %s\n", rv, \
apr_strerror(rv, (char*)&errmsg, 200)); \
exit(-1); \
} \
printf("%s\n", good); \
}

Definition at line 63 of file test_apu.h.

◆ TIME_FUNCTION

#define TIME_FUNCTION (   time,
  function 
)
Value:
{ \
function; \
time = apr_time_now() - tt; \
}
apr_int64_t apr_time_t
Definition apr_time.h:45

Definition at line 92 of file test_apu.h.