The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
acutest.h File Reference
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <stdbool.h>
+ Include dependency graph for acutest.h:

Go to the source code of this file.

Data Structures

struct  acutest_data_log_s_
 
struct  acutest_test_
 
struct  acutest_test_CMDLINE_OPTION_
 
struct  acutest_test_data_
 

Macros

#define ACUTEST_ATTRIBUTE_(attr)
 
#define ACUTEST_CMDLINE_AUXBUF_SIZE_   32
 
#define ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_   0x0001
 
#define ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_   0x0002
 
#define ACUTEST_CMDLINE_OPTID_BOGUSARG_   (-0x7fffffff + 2)
 
#define ACUTEST_CMDLINE_OPTID_MISSINGARG_   (-0x7fffffff + 1)
 
#define ACUTEST_CMDLINE_OPTID_NONE_   0
 
#define ACUTEST_CMDLINE_OPTID_UNKNOWN_   (-0x7fffffff + 0)
 
#define ACUTEST_COLOR_DEFAULT_   0
 
#define ACUTEST_COLOR_DEFAULT_INTENSIVE_   3
 
#define ACUTEST_COLOR_GREEN_   1
 
#define ACUTEST_COLOR_GREEN_INTENSIVE_   4
 
#define ACUTEST_COLOR_RED_   2
 
#define ACUTEST_COLOR_RED_INTENSIVE_   5
 
#define TEST_ASSERT(cond)
 
#define TEST_ASSERT_(cond, ...)
 
#define TEST_CASE(name)   acutest_case_("%s", name)
 
#define TEST_CASE_(...)   acutest_case_(__VA_ARGS__)
 
#define TEST_CASE_MAXSIZE   64
 
#define TEST_CHECK(cond)   acutest_check_((cond), __FILE__, __LINE__, "%s", #cond)
 
#define TEST_CHECK_(cond, ...)   acutest_check_((cond), __FILE__, __LINE__, __VA_ARGS__)
 
#define TEST_DUMP(title, addr, size)   TEST_DUMP_FAIL(title, addr, size)
 
#define TEST_DUMP_ALWAYS(title, addr, size)   acutest_dump_(true, title, addr, size);
 
#define TEST_DUMP_FAIL(title, addr, size)   acutest_dump_(false, title, addr, size);
 
#define TEST_DUMP_MAXSIZE   1024
 
#define TEST_LIST   const struct acutest_test_ acutest_list_[]
 
#define TEST_LOG_MAXSIZE   ((TEST_DUMP_MAXSIZE * 3) + TEST_MSG_MAXSIZE + 3)
 
#define TEST_MSG(...)   TEST_MSG_FAIL(__VA_ARGS__)
 
#define TEST_MSG_ALWAYS(...)   acutest_message_(true, __VA_ARGS__)
 
#define TEST_MSG_FAIL(...)   acutest_message_(false, __VA_ARGS__)
 
#define TEST_MSG_MAXSIZE   1024
 

Typedefs

typedef struct acutest_test_CMDLINE_OPTION_ ACUTEST_CMDLINE_OPTION_
 
typedef struct acutest_data_log_s_ acutest_data_log_
 
typedef int acutest_timer_type_
 

Enumerations

enum  {
  ACUTEST_FLAG_RUN_ = 1 << 0 ,
  ACUTEST_FLAG_SUCCESS_ = 1 << 1 ,
  ACUTEST_FLAG_FAILURE_ = 1 << 2
}
 

Functions

void acutest_abort_ (void) ACUTEST_ATTRIBUTE_(noreturn)
 
void ACUTEST_ATTRIBUTE_ (format(printf, 1, 2)) acutest_log_(const char *fmt
 
static int ACUTEST_ATTRIBUTE_ (format(printf, 2, 3)) acutest_colored_printf_(int color
 
int ACUTEST_ATTRIBUTE_ (format(printf, 4, 5)) acutest_check_(int cond
 
static void ACUTEST_ATTRIBUTE_ (noreturn) acutest_exit_(int exit_code)
 
static void acutest_begin_test_line_ (const struct acutest_test_ *test)
 
void acutest_case_ (const char *fmt,...)
 
int acutest_check_ (int cond, const char *file, int line, const char *fmt,...)
 
static void acutest_cleanup_ (void)
 
static int acutest_cmdline_callback_ (int id, const char *arg)
 
static int acutest_cmdline_handle_short_opt_group_ (const ACUTEST_CMDLINE_OPTION_ *options, const char *arggroup, int(*callback)(int, const char *))
 
static int acutest_cmdline_read_ (const ACUTEST_CMDLINE_OPTION_ *options, int argc, char **argv, int(*callback)(int, const char *))
 
static int acutest_do_run_ (const struct acutest_test_ *test, int index)
 
void acutest_dump_ (bool always, const char *title, const void *addr, size_t size)
 
static void acutest_fini_ (const char *test_name)
 
static void acutest_finish_test_line_ (int result)
 
static void acutest_help_ (void)
 
static void acutest_init_ (const char *test_name)
 
static void acutest_line_indent_ (int level)
 
static void acutest_list_names_ (void)
 
 acutest_log_ ("%s", buffer)
 
void acutest_log_ (const char *fmt,...)
 
static int acutest_lookup_ (const char *pattern)
 
void acutest_message_ (bool always, const char *fmt,...)
 
static int acutest_name_contains_word_ (const char *name, const char *pattern)
 
static void acutest_remember_ (int i)
 
static void acutest_run_ (const struct acutest_test_ *test, int index, int master_index)
 
static void acutest_set_duration_ (int i, double duration)
 
static void acutest_set_success_ (int i, int success)
 
static double acutest_timer_diff_ (int start, int end)
 
static void acutest_timer_get_time_ (int *ts)
 
void acutest_timer_init_ (void)
 
static void acutest_timer_print_diff_ (void)
 
 if (!acutest_colorize_)
 
 if (!acutest_test_data_[acutest_current_index_].log_head) acutest_test_data_[acutest_current_index_].log_head
 
 if ((acutest_current_test_==NULL||!acutest_cond_failed_) &&!always) return
 
 if (acutest_case_name_[0])
 
 if (acutest_test_data_[acutest_current_index_].log_tail) acutest_test_data_[acutest_current_index_].log_tail -> next=log_entry
 
 if (acutest_verbose_level_ >=verbose_level)
 
void if (acutest_verbose_level_< 2) return
 
 if (cond)
 
 if (fmt==NULL) return
 
 if (line_beg[0] !='\0')
 
 if (log_entry->msg==NULL)
 
 if (log_entry==NULL)
 
int main (int argc, char **argv)
 
 strcpy (log_entry->msg, buffer)
 
 va_end (args)
 
 va_start (args, fmt)
 
 vsnprintf (acutest_case_name_, sizeof(acutest_case_name_) - 1, fmt, args)
 
 vsnprintf (buffer, sizeof(buffer), fmt, args)
 
 vsnprintf (buffer, TEST_LOG_MAXSIZE - 1, fmt, args)
 
 vsnprintf (buffer, TEST_MSG_MAXSIZE, fmt, args)
 
 while (1)
 

Variables

return !acutest_cond_failed_
 
static int acutest_abort_has_jmp_buf_ = 0
 
static jmp_buf acutest_abort_jmp_buf_
 
static char * acutest_argv0_ = NULL
 
static int acutest_case_already_logged_ = 0
 
static char acutest_case_name_ [TEST_CASE_MAXSIZE] = ""
 
static const ACUTEST_CMDLINE_OPTION_ acutest_cmdline_options_ []
 
static int acutest_colorize_ = 0
 
static int acutest_cond_failed_ = 0
 
static size_t acutest_count_ = 0
 
static int acutest_current_index_ = 0
 
static const struct acutest_test_acutest_current_test_ = NULL
 
const struct acutest_test_ acutest_list_ []
 
static size_t acutest_list_size_ = 0
 
static int acutest_no_exec_ = -1
 
static int acutest_no_summary_ = 0
 
static int acutest_skip_mode_ = 0
 
static int acutest_stat_failed_units_ = 0
 
static int acutest_stat_run_units_ = 0
 
static int acutest_tap_ = 0
 
static int acutest_test_already_logged_ = 0
 
static struct acutest_test_data_acutest_test_data_ = NULL
 
static int acutest_test_failures_ = 0
 
static int acutest_timer_ = 0
 
static acutest_timer_type_ acutest_timer_end_
 
static acutest_timer_type_ acutest_timer_start_
 
static int acutest_verbose_level_ = 2
 
static int acutest_was_aborted_ = 0
 
static int acutest_worker_ = 0
 
static int acutest_worker_index_ = 0
 
static FILE * acutest_xml_output_ = NULL
 
va_list args
 
static int const char char buffer [256]
 
 else
 
int const char * file
 
static int const char * fmt
 
int const char int line
 
void const char char * line_beg
 
char * line_end
 
void acutest_data_log_log_entry
 
acutest_test_data_[acutest_current_index_log_tail = log_entry
 
log_entry msg = (char *)calloc(strlen(buffer) + 1, sizeof(char))
 
int n = printf("%s", buffer)
 
int const char int const char int result_color
 
 result_str = "failed"
 
int verbose_level = 2
 

Data Structure Documentation

◆ acutest_data_log_s_

struct acutest_data_log_s_

Definition at line 366 of file acutest.h.

+ Collaboration diagram for acutest_data_log_s_:
Data Fields
char * msg
acutest_data_log_ * next

◆ acutest_test_CMDLINE_OPTION_

struct acutest_test_CMDLINE_OPTION_

Definition at line 1428 of file acutest.h.

Data Fields
unsigned flags
int id
const char * longname
char shortname

◆ acutest_test_data_

struct acutest_test_data_

Definition at line 371 of file acutest.h.

+ Collaboration diagram for acutest_test_data_:
Data Fields
double duration
unsigned char flags
acutest_data_log_ * log_head
acutest_data_log_ * log_tail

Macro Definition Documentation

◆ ACUTEST_ATTRIBUTE_

#define ACUTEST_ATTRIBUTE_ (   attr)

Definition at line 340 of file acutest.h.

◆ ACUTEST_CMDLINE_AUXBUF_SIZE_

#define ACUTEST_CMDLINE_AUXBUF_SIZE_   32

Definition at line 1469 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_

#define ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_   0x0001

Definition at line 1420 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_

#define ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_   0x0002

Definition at line 1421 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_BOGUSARG_

#define ACUTEST_CMDLINE_OPTID_BOGUSARG_   (-0x7fffffff + 2)

Definition at line 1426 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_MISSINGARG_

#define ACUTEST_CMDLINE_OPTID_MISSINGARG_   (-0x7fffffff + 1)

Definition at line 1425 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_NONE_

#define ACUTEST_CMDLINE_OPTID_NONE_   0

Definition at line 1423 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_UNKNOWN_

#define ACUTEST_CMDLINE_OPTID_UNKNOWN_   (-0x7fffffff + 0)

Definition at line 1424 of file acutest.h.

◆ ACUTEST_COLOR_DEFAULT_

#define ACUTEST_COLOR_DEFAULT_   0

Definition at line 565 of file acutest.h.

◆ ACUTEST_COLOR_DEFAULT_INTENSIVE_

#define ACUTEST_COLOR_DEFAULT_INTENSIVE_   3

Definition at line 568 of file acutest.h.

◆ ACUTEST_COLOR_GREEN_

#define ACUTEST_COLOR_GREEN_   1

Definition at line 566 of file acutest.h.

◆ ACUTEST_COLOR_GREEN_INTENSIVE_

#define ACUTEST_COLOR_GREEN_INTENSIVE_   4

Definition at line 569 of file acutest.h.

◆ ACUTEST_COLOR_RED_

#define ACUTEST_COLOR_RED_   2

Definition at line 567 of file acutest.h.

◆ ACUTEST_COLOR_RED_INTENSIVE_

#define ACUTEST_COLOR_RED_INTENSIVE_   5

Definition at line 570 of file acutest.h.

◆ TEST_ASSERT

#define TEST_ASSERT (   cond)
Value:
do { \
if(!acutest_check_((cond), __FILE__, __LINE__, "%s", #cond)) \
acutest_abort_(); \
} while(0)
int acutest_check_(int cond, const char *file, int line, const char *fmt,...)

Definition at line 108 of file acutest.h.

◆ TEST_ASSERT_

#define TEST_ASSERT_ (   cond,
  ... 
)
Value:
do { \
if(!acutest_check_((cond), __FILE__, __LINE__, __VA_ARGS__)) \
acutest_abort_(); \
} while(0)

Definition at line 103 of file acutest.h.

◆ TEST_CASE

#define TEST_CASE (   name)    acutest_case_("%s", name)

Definition at line 184 of file acutest.h.

◆ TEST_CASE_

#define TEST_CASE_ (   ...)    acutest_case_(__VA_ARGS__)

Definition at line 183 of file acutest.h.

◆ TEST_CASE_MAXSIZE

#define TEST_CASE_MAXSIZE   64

Definition at line 191 of file acutest.h.

◆ TEST_CHECK

#define TEST_CHECK (   cond)    acutest_check_((cond), __FILE__, __LINE__, "%s", #cond)

Definition at line 85 of file acutest.h.

◆ TEST_CHECK_

#define TEST_CHECK_ (   cond,
  ... 
)    acutest_check_((cond), __FILE__, __LINE__, __VA_ARGS__)

Definition at line 84 of file acutest.h.

◆ TEST_DUMP

#define TEST_DUMP (   title,
  addr,
  size 
)    TEST_DUMP_FAIL(title, addr, size)

Definition at line 243 of file acutest.h.

◆ TEST_DUMP_ALWAYS

#define TEST_DUMP_ALWAYS (   title,
  addr,
  size 
)    acutest_dump_(true, title, addr, size);

Definition at line 249 of file acutest.h.

◆ TEST_DUMP_FAIL

#define TEST_DUMP_FAIL (   title,
  addr,
  size 
)    acutest_dump_(false, title, addr, size);

Definition at line 244 of file acutest.h.

◆ TEST_DUMP_MAXSIZE

#define TEST_DUMP_MAXSIZE   1024

Definition at line 255 of file acutest.h.

◆ TEST_LIST

#define TEST_LIST   const struct acutest_test_ acutest_list_[]

Definition at line 62 of file acutest.h.

◆ TEST_LOG_MAXSIZE

#define TEST_LOG_MAXSIZE   ((TEST_DUMP_MAXSIZE * 3) + TEST_MSG_MAXSIZE + 3)

Definition at line 262 of file acutest.h.

◆ TEST_MSG

#define TEST_MSG (   ...)    TEST_MSG_FAIL(__VA_ARGS__)

Definition at line 215 of file acutest.h.

◆ TEST_MSG_ALWAYS

#define TEST_MSG_ALWAYS (   ...)    acutest_message_(true, __VA_ARGS__)

Definition at line 222 of file acutest.h.

◆ TEST_MSG_FAIL

#define TEST_MSG_FAIL (   ...)    acutest_message_(false, __VA_ARGS__)

Definition at line 216 of file acutest.h.

◆ TEST_MSG_MAXSIZE

#define TEST_MSG_MAXSIZE   1024

Definition at line 228 of file acutest.h.

Typedef Documentation

◆ ACUTEST_CMDLINE_OPTION_

◆ acutest_data_log_

Definition at line 1 of file acutest.h.

◆ acutest_timer_type_

typedef int acutest_timer_type_

Definition at line 538 of file acutest.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ACUTEST_FLAG_RUN_ 
ACUTEST_FLAG_SUCCESS_ 
ACUTEST_FLAG_FAILURE_ 

Definition at line 378 of file acutest.h.

Function Documentation

◆ acutest_abort_()

void acutest_abort_ ( void  )

Definition at line 971 of file acutest.h.

+ Here is the call graph for this function:

◆ ACUTEST_ATTRIBUTE_() [1/4]

static void ACUTEST_ATTRIBUTE_ ( format(printf, 1, 2)  ) const

◆ ACUTEST_ATTRIBUTE_() [2/4]

void ACUTEST_ATTRIBUTE_ ( format(printf, 2, 3)  )
static

◆ ACUTEST_ATTRIBUTE_() [3/4]

int ACUTEST_ATTRIBUTE_ ( format(printf, 4, 5)  )

◆ ACUTEST_ATTRIBUTE_() [4/4]

static void ACUTEST_ATTRIBUTE_ ( noreturn  )
static

Definition at line 455 of file acutest.h.

+ Here is the call graph for this function:

◆ acutest_begin_test_line_()

static void acutest_begin_test_line_ ( const struct acutest_test_ test)
static

Definition at line 634 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_case_()

void acutest_case_ ( const char *  fmt,
  ... 
)
+ Here is the caller graph for this function:

◆ acutest_check_()

int acutest_check_ ( int  cond,
const char *  file,
int  line,
const char *  fmt,
  ... 
)
+ Here is the caller graph for this function:

◆ acutest_cleanup_()

static void acutest_cleanup_ ( void  )
static

Definition at line 431 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_cmdline_callback_()

static int acutest_cmdline_callback_ ( int  id,
const char *  arg 
)
static

Definition at line 1648 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_cmdline_handle_short_opt_group_()

static int acutest_cmdline_handle_short_opt_group_ ( const ACUTEST_CMDLINE_OPTION_ options,
const char *  arggroup,
int(*)(int, const char *)  callback 
)
static

Definition at line 1436 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_cmdline_read_()

static int acutest_cmdline_read_ ( const ACUTEST_CMDLINE_OPTION_ options,
int  argc,
char **  argv,
int(*)(int, const char *)  callback 
)
static

Definition at line 1472 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_do_run_()

static int acutest_do_run_ ( const struct acutest_test_ test,
int  index 
)
static

Definition at line 1104 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_dump_()

void acutest_dump_ ( bool  always,
const char *  title,
const void *  addr,
size_t  size 
)

Definition at line 871 of file acutest.h.

+ Here is the call graph for this function:

◆ acutest_fini_()

static void acutest_fini_ ( const char *  test_name)
static

Definition at line 959 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_finish_test_line_()

static void acutest_finish_test_line_ ( int  result)
static

Definition at line 655 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_help_()

static void acutest_help_ ( void  )
static

Definition at line 1579 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_init_()

static void acutest_init_ ( const char *  test_name)
static

Definition at line 946 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_line_indent_()

static void acutest_line_indent_ ( int  level)
static

Definition at line 684 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_list_names_()

static void acutest_list_names_ ( void  )
static

Definition at line 983 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_log_() [1/2]

acutest_log_ ( "%s"  ,
buffer   
)

◆ acutest_log_() [2/2]

void acutest_log_ ( const char *  fmt,
  ... 
)
+ Here is the caller graph for this function:

◆ acutest_lookup_()

static int acutest_lookup_ ( const char *  pattern)
static

Definition at line 1038 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_message_()

void acutest_message_ ( bool  always,
const char *  fmt,
  ... 
)
+ Here is the caller graph for this function:

◆ acutest_name_contains_word_()

static int acutest_name_contains_word_ ( const char *  name,
const char *  pattern 
)
static

Definition at line 1015 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_remember_()

static void acutest_remember_ ( int  i)
static

Definition at line 993 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_run_()

static void acutest_run_ ( const struct acutest_test_ test,
int  index,
int  master_index 
)
static

Definition at line 1203 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acutest_set_duration_()

static void acutest_set_duration_ ( int  i,
double  duration 
)
static

Definition at line 1009 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_set_success_()

static void acutest_set_success_ ( int  i,
int  success 
)
static

Definition at line 1003 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_timer_diff_()

static double acutest_timer_diff_ ( int  start,
int  end 
)
static

Definition at line 553 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_timer_get_time_()

static void acutest_timer_get_time_ ( int *  ts)
static

Definition at line 547 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_timer_init_()

void acutest_timer_init_ ( void  )

Definition at line 543 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_timer_print_diff_()

static void acutest_timer_print_diff_ ( void  )
static

Definition at line 561 of file acutest.h.

+ Here is the caller graph for this function:

◆ if() [1/12]

if ( acutest_colorize_)

Definition at line 584 of file acutest.h.

◆ if() [2/12]

if ( !acutest_test_data_.  log_head[acutest_current_index_])

◆ if() [3/12]

if ( (acutest_current_test_==NULL||!acutest_cond_failed_) &&!  always)

◆ if() [4/12]

if ( acutest_case_name_  [0])

Definition at line 811 of file acutest.h.

◆ if() [5/12]

if ( acutest_test_data_.  log_tail[acutest_current_index_]) -> next=log_entry

◆ if() [6/12]

if ( acutest_verbose_level_ >=  verbose_level)
Initial value:
{
return
static int acutest_verbose_level_
Definition: acutest.h:418

Definition at line 723 of file acutest.h.

+ Here is the call graph for this function:

◆ if() [7/12]

if ( )

Definition at line 2098 of file event.c.

+ Here is the call graph for this function:

◆ if() [8/12]

if ( cond  )

Definition at line 708 of file acutest.h.

◆ if() [9/12]

if ( fmt  = =NULL)

◆ if() [10/12]

if ( line_beg [0] = '\0')

Definition at line 864 of file acutest.h.

+ Here is the call graph for this function:

◆ if() [11/12]

if ( log_entry->  msg = = NULL)

Definition at line 795 of file acutest.h.

◆ if() [12/12]

if ( log_entry  = = NULL)

Definition at line 773 of file acutest.h.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1832 of file acutest.h.

+ Here is the call graph for this function:

◆ strcpy()

strcpy ( log_entry->  msg,
buffer   
)
+ Here is the caller graph for this function:

◆ va_end()

va_end ( args  )

◆ va_start()

va_start ( args  ,
fmt   
)
+ Here is the caller graph for this function:

◆ vsnprintf() [1/4]

vsnprintf ( acutest_case_name_  ,
sizeof(acutest_case_name_) -  1,
fmt  ,
args   
)

◆ vsnprintf() [2/4]

vsnprintf ( buffer  ,
sizeof(buffer ,
fmt  ,
args   
)
+ Here is the caller graph for this function:

◆ vsnprintf() [3/4]

vsnprintf ( buffer  ,
TEST_LOG_MAXSIZE 1,
fmt  ,
args   
)

◆ vsnprintf() [4/4]

vsnprintf ( buffer  ,
TEST_MSG_MAXSIZE  ,
fmt  ,
args   
)

◆ while()

while ( )

Definition at line 856 of file acutest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ !acutest_cond_failed_

Definition at line 762 of file acutest.h.

◆ acutest_abort_has_jmp_buf_

int acutest_abort_has_jmp_buf_ = 0
static

Definition at line 423 of file acutest.h.

◆ acutest_abort_jmp_buf_

jmp_buf acutest_abort_jmp_buf_
static

Definition at line 424 of file acutest.h.

◆ acutest_argv0_

char* acutest_argv0_ = NULL
static

Definition at line 396 of file acutest.h.

◆ acutest_case_already_logged_

int acutest_case_already_logged_ = 0
static

Definition at line 417 of file acutest.h.

◆ acutest_case_name_

acutest_case_name_[sizeof(acutest_case_name_) - 1] = ""
static

Definition at line 415 of file acutest.h.

◆ acutest_cmdline_options_

const ACUTEST_CMDLINE_OPTION_ acutest_cmdline_options_[]
static
Initial value:
= {
{ 's', "skip", 's', 0 },
{ 'E', "no-exec", 'E', 0 },
{ 0, "no-summary", 'S', 0 },
{ 0, "tap", 'T', 0 },
{ 'l', "list", 'l', 0 },
{ 'v', "verbose", 'v', ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_ },
{ 'q', "quiet", 'q', 0 },
{ 0, "no-color", 'C', 0 },
{ 'h', "help", 'h', 0 },
{ 0, "worker", 'w', ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_ },
{ 'x', "xml-output", 'x', ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_ },
{ 0, NULL, 0, 0 }
}
#define ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_
Definition: acutest.h:1421
#define ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_
Definition: acutest.h:1420

Definition at line 1622 of file acutest.h.

◆ acutest_colorize_

int acutest_colorize_ = 0
static

Definition at line 420 of file acutest.h.

◆ acutest_cond_failed_

acutest_cond_failed_ = 0
static

Definition at line 406 of file acutest.h.

◆ acutest_count_

size_t acutest_count_ = 0
static

Definition at line 399 of file acutest.h.

◆ acutest_current_index_

int acutest_current_index_ = 0
static

Definition at line 414 of file acutest.h.

◆ acutest_current_test_

const struct acutest_test_* acutest_current_test_ = NULL
static

Definition at line 413 of file acutest.h.

◆ acutest_list_

const struct acutest_test_ acutest_list_[]
extern

◆ acutest_list_size_

size_t acutest_list_size_ = 0
static

Definition at line 397 of file acutest.h.

◆ acutest_no_exec_

int acutest_no_exec_ = -1
static

Definition at line 400 of file acutest.h.

◆ acutest_no_summary_

int acutest_no_summary_ = 0
static

Definition at line 401 of file acutest.h.

◆ acutest_skip_mode_

int acutest_skip_mode_ = 0
static

Definition at line 403 of file acutest.h.

◆ acutest_stat_failed_units_

int acutest_stat_failed_units_ = 0
static

Definition at line 410 of file acutest.h.

◆ acutest_stat_run_units_

int acutest_stat_run_units_ = 0
static

Definition at line 411 of file acutest.h.

◆ acutest_tap_

int acutest_tap_ = 0
static

Definition at line 402 of file acutest.h.

◆ acutest_test_already_logged_

acutest_test_already_logged_ = 0
static

Definition at line 416 of file acutest.h.

◆ acutest_test_data_

struct acutest_test_data_* acutest_test_data_ = NULL
static

Definition at line 398 of file acutest.h.

◆ acutest_test_failures_

acutest_test_failures_ = 0
static

Definition at line 419 of file acutest.h.

◆ acutest_timer_

int acutest_timer_ = 0
static

Definition at line 421 of file acutest.h.

◆ acutest_timer_end_

acutest_timer_type_ acutest_timer_end_
static

Definition at line 540 of file acutest.h.

◆ acutest_timer_start_

acutest_timer_type_ acutest_timer_start_
static

Definition at line 539 of file acutest.h.

◆ acutest_verbose_level_

int acutest_verbose_level_ = 2
static

Definition at line 418 of file acutest.h.

◆ acutest_was_aborted_

int acutest_was_aborted_ = 0
static

Definition at line 407 of file acutest.h.

◆ acutest_worker_

int acutest_worker_ = 0
static

Definition at line 404 of file acutest.h.

◆ acutest_worker_index_

int acutest_worker_index_ = 0
static

Definition at line 405 of file acutest.h.

◆ acutest_xml_output_

FILE* acutest_xml_output_ = NULL
static

Definition at line 408 of file acutest.h.

◆ args

va_list args

Definition at line 770 of file acutest.h.

◆ buffer

buffer[TEST_MSG_MAXSIZE-1]
Initial value:
{
va_list args
va_list args
Definition: acutest.h:770

Definition at line 576 of file acutest.h.

◆ else

else
Initial value:
{
static int acutest_test_already_logged_
Definition: acutest.h:416
static const struct acutest_test_ * acutest_current_test_
Definition: acutest.h:413
static void acutest_finish_test_line_(int result)
Definition: acutest.h:655

Definition at line 712 of file acutest.h.

◆ file

int const char* file

Definition at line 702 of file acutest.h.

◆ fmt

void const char * fmt

Definition at line 573 of file acutest.h.

◆ line

int const char int line

Definition at line 702 of file acutest.h.

◆ line_beg

line_beg
Initial value:
{
static int const char char buffer[256]
Definition: acutest.h:574
#define TEST_MSG_MAXSIZE
Definition: acutest.h:228

Definition at line 836 of file acutest.h.

◆ line_end

char* line_end

Definition at line 837 of file acutest.h.

◆ log_entry

log_entry
Initial value:
{
#define TEST_LOG_MAXSIZE
Definition: acutest.h:262

Definition at line 769 of file acutest.h.

◆ log_tail

Definition at line 787 of file acutest.h.

◆ msg

log_entry msg = (char *)calloc(strlen(buffer) + 1, sizeof(char))

Definition at line 794 of file acutest.h.

◆ n

return n = printf("%s", buffer)

Definition at line 577 of file acutest.h.

◆ result_color

result_color
Initial value:
{
const char *result_str
result_str
Definition: acutest.h:716

Definition at line 705 of file acutest.h.

◆ result_str

result_str = "failed"

Definition at line 716 of file acutest.h.

◆ verbose_level

verbose_level = 2

Definition at line 706 of file acutest.h.