The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
acutest.h File Reference
#include <stdbool.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
+ Include dependency graph for acutest.h:
+ This graph shows which files directly or indirectly include this file:

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_   10
 
#define ACUTEST_COLOR_GREEN_   2
 
#define ACUTEST_COLOR_GREEN_INTENSIVE_   12
 
#define ACUTEST_COLOR_RED_   1
 
#define ACUTEST_COLOR_RED_INTENSIVE_   11
 
#define ACUTEST_COLOR_YELLOW_   3
 
#define ACUTEST_COLOR_YELLOW_INTENSIVE_   13
 
#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
 
#define TEST_SKIP(...)   acutest_skip_(__FILE__, __LINE__, __VA_ARGS__)
 
#define TEST_TERMINATOR   { .name = NULL }
 

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_state_ : int8_t {
  ACUTEST_STATE_INITIAL = -4 ,
  ACUTEST_STATE_SELECTED = -3 ,
  ACUTEST_STATE_NEEDTORUN = -2 ,
  ACUTEST_STATE_EXCLUDED = -1 ,
  ACUTEST_STATE_SUCCESS = 0 ,
  ACUTEST_STATE_FAILED = 1 ,
  ACUTEST_STATE_SKIPPED = 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
 
void ACUTEST_ATTRIBUTE_ (format(printf, 3, 4)) acutest_skip_(const char *file
 
int ACUTEST_ATTRIBUTE_ (format(printf, 4, 5)) acutest_check_(int cond
 
static void ACUTEST_ATTRIBUTE_ (noreturn) acutest_exit_(int exit_code)
 
static const char * acutest_basename_ (const char *path)
 
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_count_ (enum acutest_state_ state)
 
static enum acutest_state_ 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_ (enum acutest_state_ state)
 
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,...)
 
void acutest_message_ (bool always, const char *fmt,...)
 
static int acutest_name_contains_word_ (const char *name, const char *pattern)
 
static void acutest_run_ (const struct acutest_test_ *test, int index, int master_index)
 
static int acutest_select_ (const char *pattern)
 
void acutest_skip_ (const char *file, int line, const char *fmt,...)
 
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)
 
static int acutest_under_debugger_ (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_check_count_ > 0)
 
 if (acutest_test_data_[acutest_current_index_].log_tail) acutest_test_data_[acutest_current_index_].log_tail -> next=log_entry
 
 if (acutest_test_skip_count_)
 
 if (acutest_test_skip_reason_[reason_len-1]=='.') acutest_test_skip_reason_[reason_len-1]
 
 if (acutest_verbose_level_ >=2)
 
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 (acutest_test_skip_reason_, sizeof(acutest_test_skip_reason_), 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_
 
skip_check __pad0__
 
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 int acutest_current_index_ = 0
 
static const struct acutest_test_ * acutest_current_test_ = NULL
 
static int acutest_exclude_mode_ = 0
 
const struct acutest_test_ acutest_list_ []
 
static int acutest_list_size_ = 0
 
static int acutest_no_exec_ = -1
 
static int acutest_no_summary_ = 0
 
static int acutest_tap_ = 0
 
static int acutest_test_already_logged_ = 0
 
static int acutest_test_check_count_ = 0
 
static struct acutest_test_data_ * acutest_test_data_ = NULL
 
static int acutest_test_failures_ = 0
 
static int acutest_test_skip_count_ = 0
 
static char acutest_test_skip_reason_ [256] = ""
 
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_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
 
void 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)
 
void int const char size_t reason_len
 
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 442 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 1566 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 447 of file acutest.h.

+ Collaboration diagram for acutest_test_data_:
Data Fields
double duration
acutest_data_log_ * log_head
acutest_data_log_ * log_tail
enum acutest_state_ state

Macro Definition Documentation

◆ ACUTEST_ATTRIBUTE_

#define ACUTEST_ATTRIBUTE_ (   attr)

Definition at line 333 of file acutest.h.

◆ ACUTEST_CMDLINE_AUXBUF_SIZE_

#define ACUTEST_CMDLINE_AUXBUF_SIZE_   32

Definition at line 1607 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_

#define ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_   0x0001

Definition at line 1558 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_

#define ACUTEST_CMDLINE_OPTFLAG_REQUIREDARG_   0x0002

Definition at line 1559 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_BOGUSARG_

#define ACUTEST_CMDLINE_OPTID_BOGUSARG_   (-0x7fffffff + 2)

Definition at line 1564 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_MISSINGARG_

#define ACUTEST_CMDLINE_OPTID_MISSINGARG_   (-0x7fffffff + 1)

Definition at line 1563 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_NONE_

#define ACUTEST_CMDLINE_OPTID_NONE_   0

Definition at line 1561 of file acutest.h.

◆ ACUTEST_CMDLINE_OPTID_UNKNOWN_

#define ACUTEST_CMDLINE_OPTID_UNKNOWN_   (-0x7fffffff + 0)

Definition at line 1562 of file acutest.h.

◆ ACUTEST_COLOR_DEFAULT_

#define ACUTEST_COLOR_DEFAULT_   0

Definition at line 628 of file acutest.h.

◆ ACUTEST_COLOR_DEFAULT_INTENSIVE_

#define ACUTEST_COLOR_DEFAULT_INTENSIVE_   10

Definition at line 632 of file acutest.h.

◆ ACUTEST_COLOR_GREEN_

#define ACUTEST_COLOR_GREEN_   2

Definition at line 630 of file acutest.h.

◆ ACUTEST_COLOR_GREEN_INTENSIVE_

#define ACUTEST_COLOR_GREEN_INTENSIVE_   12

Definition at line 634 of file acutest.h.

◆ ACUTEST_COLOR_RED_

#define ACUTEST_COLOR_RED_   1

Definition at line 629 of file acutest.h.

◆ ACUTEST_COLOR_RED_INTENSIVE_

#define ACUTEST_COLOR_RED_INTENSIVE_   11

Definition at line 633 of file acutest.h.

◆ ACUTEST_COLOR_YELLOW_

#define ACUTEST_COLOR_YELLOW_   3

Definition at line 631 of file acutest.h.

◆ ACUTEST_COLOR_YELLOW_INTENSIVE_

#define ACUTEST_COLOR_YELLOW_INTENSIVE_   13

Definition at line 635 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 125 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 120 of file acutest.h.

◆ TEST_CASE

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

Definition at line 203 of file acutest.h.

◆ TEST_CASE_

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

Definition at line 202 of file acutest.h.

◆ TEST_CASE_MAXSIZE

#define TEST_CASE_MAXSIZE   64

Definition at line 210 of file acutest.h.

◆ TEST_CHECK

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

Definition at line 101 of file acutest.h.

◆ TEST_CHECK_

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

Definition at line 99 of file acutest.h.

◆ TEST_DUMP

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

Definition at line 262 of file acutest.h.

◆ TEST_DUMP_ALWAYS

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

Definition at line 268 of file acutest.h.

◆ TEST_DUMP_FAIL

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

Definition at line 263 of file acutest.h.

◆ TEST_DUMP_MAXSIZE

#define TEST_DUMP_MAXSIZE   1024

Definition at line 274 of file acutest.h.

◆ TEST_LIST

#define TEST_LIST   const struct acutest_test_ acutest_list_[]

Definition at line 75 of file acutest.h.

◆ TEST_LOG_MAXSIZE

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

Definition at line 281 of file acutest.h.

◆ TEST_MSG

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

Definition at line 234 of file acutest.h.

◆ TEST_MSG_ALWAYS

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

Definition at line 241 of file acutest.h.

◆ TEST_MSG_FAIL

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

Definition at line 235 of file acutest.h.

◆ TEST_MSG_MAXSIZE

#define TEST_MSG_MAXSIZE   1024

Definition at line 247 of file acutest.h.

◆ TEST_SKIP

#define TEST_SKIP (   ...)    acutest_skip_(__FILE__, __LINE__, __VA_ARGS__)

Definition at line 290 of file acutest.h.

◆ TEST_TERMINATOR

#define TEST_TERMINATOR   { .name = NULL }

Definition at line 77 of file acutest.h.

Typedef Documentation

◆ ACUTEST_CMDLINE_OPTION_

◆ acutest_data_log_

Definition at line 440 of file acutest.h.

◆ acutest_timer_type_

typedef int acutest_timer_type_

Definition at line 601 of file acutest.h.

Enumeration Type Documentation

◆ acutest_state_

enum acutest_state_ : int8_t
Enumerator
ACUTEST_STATE_INITIAL 
ACUTEST_STATE_SELECTED 
ACUTEST_STATE_NEEDTORUN 
ACUTEST_STATE_EXCLUDED 
ACUTEST_STATE_SUCCESS 
ACUTEST_STATE_FAILED 
ACUTEST_STATE_SKIPPED 

Definition at line 340 of file acutest.h.

Function Documentation

◆ acutest_abort_()

void acutest_abort_ ( void  )

Definition at line 1124 of file acutest.h.

+ Here is the call graph for this function:

◆ ACUTEST_ATTRIBUTE_() [1/5]

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

◆ ACUTEST_ATTRIBUTE_() [2/5]

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

◆ ACUTEST_ATTRIBUTE_() [3/5]

void ACUTEST_ATTRIBUTE_ ( format(printf, 3, 4)  ) const

◆ ACUTEST_ATTRIBUTE_() [4/5]

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

◆ ACUTEST_ATTRIBUTE_() [5/5]

static void ACUTEST_ATTRIBUTE_ ( noreturn  )
static

Definition at line 528 of file acutest.h.

+ Here is the call graph for this function:

◆ acutest_basename_()

static const char * acutest_basename_ ( const char *  path)
static

Definition at line 703 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_begin_test_line_()

static void acutest_begin_test_line_ ( const struct acutest_test_ *  test)
static

Definition at line 732 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,
  ... 
)

Definition at line 343 of file merged_model.c.

+ Here is the caller graph for this function:

◆ acutest_cleanup_()

static void acutest_cleanup_ ( void  )
static

Definition at line 504 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 1787 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 1574 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 1610 of file acutest.h.

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

◆ acutest_count_()

static int acutest_count_ ( enum acutest_state_  state)
static

Definition at line 487 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_do_run_()

static enum acutest_state_ acutest_do_run_ ( const struct acutest_test_ *  test,
int  index 
)
static

Definition at line 1237 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 1024 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 1112 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_finish_test_line_()

static void acutest_finish_test_line_ ( enum acutest_state_  state)
static

Definition at line 753 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 1717 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 1099 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 792 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 1138 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_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 1148 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 1351 of file acutest.h.

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

◆ acutest_select_()

static int acutest_select_ ( const char *  pattern)
static

Definition at line 1171 of file acutest.h.

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

◆ acutest_skip_()

void acutest_skip_ ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

◆ acutest_timer_diff_()

static double acutest_timer_diff_ ( int  start,
int  end 
)
static

Definition at line 616 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 610 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_timer_init_()

void acutest_timer_init_ ( void  )

Definition at line 606 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 624 of file acutest.h.

+ Here is the caller graph for this function:

◆ acutest_under_debugger_()

static int acutest_under_debugger_ ( void  )
static

Definition at line 1920 of file acutest.h.

+ Here is the caller graph for this function:

◆ if() [1/15]

if ( !  acutest_colorize_)

Definition at line 649 of file acutest.h.

◆ if() [2/15]

if ( !acutest_test_data_.  log_head[acutest_current_index_])

◆ if() [3/15]

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

◆ if() [4/15]

if ( acutest_case_name_  [0])

Definition at line 964 of file acutest.h.

◆ if() [5/15]

if ( acutest_test_check_count_  ,
0   
)

Definition at line 825 of file acutest.h.

+ Here is the call graph for this function:

◆ if() [6/15]

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

◆ if() [7/15]

Definition at line 861 of file acutest.h.

◆ if() [8/15]

if ( acutest_test_skip_reason_  [reason_len-1] = ='.')

◆ if() [9/15]

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

Definition at line 830 of file acutest.h.

+ Here is the call graph for this function:

◆ if() [10/15]

if ( )

◆ if() [11/15]

if ( cond  )

Definition at line 869 of file acutest.h.

◆ if() [12/15]

if ( fmt  = =NULL)

◆ if() [13/15]

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

Definition at line 1017 of file acutest.h.

+ Here is the call graph for this function:

◆ if() [14/15]

if ( log_entry->  msg = = NULL)

Definition at line 948 of file acutest.h.

◆ if() [15/15]

if ( log_entry  = = NULL)

Definition at line 926 of file acutest.h.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 2016 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/5]

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

◆ vsnprintf() [2/5]

vsnprintf ( acutest_test_skip_reason_  ,
sizeof(acutest_test_skip_reason_)  ,
fmt  ,
args   
)

◆ vsnprintf() [3/5]

vsnprintf ( buffer  ,
sizeof(buffer)  ,
fmt  ,
args   
)

◆ vsnprintf() [4/5]

vsnprintf ( buffer  ,
TEST_LOG_MAXSIZE -  1,
fmt  ,
args   
)

◆ vsnprintf() [5/5]

vsnprintf ( buffer  ,
TEST_MSG_MAXSIZE  ,
fmt  ,
args   
)

◆ while()

while ( 1  )

Definition at line 1009 of file acutest.h.

+ Here is the call graph for this function:

Variable Documentation

◆ !acutest_cond_failed_

Definition at line 915 of file acutest.h.

◆ __pad0__

skip_check __pad0__

Definition at line 913 of file acutest.h.

◆ acutest_abort_has_jmp_buf_

int acutest_abort_has_jmp_buf_ = 0
static

Definition at line 483 of file acutest.h.

◆ acutest_abort_jmp_buf_

jmp_buf acutest_abort_jmp_buf_
static

Definition at line 484 of file acutest.h.

◆ acutest_argv0_

char* acutest_argv0_ = NULL
static

Definition at line 458 of file acutest.h.

◆ acutest_case_already_logged_

int acutest_case_already_logged_ = 0
static

Definition at line 477 of file acutest.h.

◆ acutest_case_name_

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

Definition at line 472 of file acutest.h.

◆ acutest_cmdline_options_

const ACUTEST_CMDLINE_OPTION_ acutest_cmdline_options_[]
static
Initial value:
= {
{ 'X', "exclude", 'X', 0 },
{ 's', "skip", 'X', 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:1559
#define ACUTEST_CMDLINE_OPTFLAG_OPTIONALARG_
Definition acutest.h:1558

Definition at line 1760 of file acutest.h.

◆ acutest_colorize_

int acutest_colorize_ = 0
static

Definition at line 480 of file acutest.h.

◆ acutest_cond_failed_

int acutest_cond_failed_ = 0
static

Definition at line 467 of file acutest.h.

◆ acutest_current_index_

int acutest_current_index_ = 0
static

Definition at line 471 of file acutest.h.

◆ acutest_current_test_

const struct acutest_test_* acutest_current_test_ = NULL
static

Definition at line 470 of file acutest.h.

◆ acutest_exclude_mode_

int acutest_exclude_mode_ = 0
static

Definition at line 464 of file acutest.h.

◆ acutest_list_

const struct acutest_test_ acutest_list_[]
extern

◆ acutest_list_size_

int acutest_list_size_ = 0
static

Definition at line 459 of file acutest.h.

◆ acutest_no_exec_

int acutest_no_exec_ = -1
static

Definition at line 461 of file acutest.h.

◆ acutest_no_summary_

int acutest_no_summary_ = 0
static

Definition at line 462 of file acutest.h.

◆ acutest_tap_

int acutest_tap_ = 0
static

Definition at line 463 of file acutest.h.

◆ acutest_test_already_logged_

acutest_test_already_logged_ = 0
static

Definition at line 476 of file acutest.h.

◆ acutest_test_check_count_

acutest_test_check_count_ = 0
static

Definition at line 473 of file acutest.h.

◆ acutest_test_data_

struct acutest_test_data_* acutest_test_data_ = NULL
static

Definition at line 460 of file acutest.h.

◆ acutest_test_failures_

acutest_test_failures_ = 0
static

Definition at line 479 of file acutest.h.

◆ acutest_test_skip_count_

acutest_test_skip_count_ = 0
static

Definition at line 474 of file acutest.h.

◆ acutest_test_skip_reason_

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

Definition at line 475 of file acutest.h.

◆ acutest_timer_

int acutest_timer_ = 0
static

Definition at line 481 of file acutest.h.

◆ acutest_timer_end_

acutest_timer_type_ acutest_timer_end_
static

Definition at line 603 of file acutest.h.

◆ acutest_timer_start_

acutest_timer_type_ acutest_timer_start_
static

Definition at line 602 of file acutest.h.

◆ acutest_verbose_level_

int acutest_verbose_level_ = 2
static

Definition at line 478 of file acutest.h.

◆ acutest_worker_

int acutest_worker_ = 0
static

Definition at line 465 of file acutest.h.

◆ acutest_worker_index_

int acutest_worker_index_ = 0
static

Definition at line 466 of file acutest.h.

◆ acutest_xml_output_

FILE* acutest_xml_output_ = NULL
static

Definition at line 468 of file acutest.h.

◆ args

va_list args

Definition at line 923 of file acutest.h.

◆ buffer

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

Definition at line 641 of file acutest.h.

◆ else

else
Initial value:
{
static int acutest_test_already_logged_
Definition acutest.h:476
static void acutest_finish_test_line_(enum acutest_state_ state)
Definition acutest.h:753
static const struct acutest_test_ * acutest_current_test_
Definition acutest.h:470
@ ACUTEST_STATE_FAILED
Definition acutest.h:348

Definition at line 873 of file acutest.h.

◆ file

int const char* file

Definition at line 855 of file acutest.h.

◆ fmt

void const char * fmt

Definition at line 638 of file acutest.h.

◆ line

int const char int line

Definition at line 810 of file acutest.h.

◆ line_beg

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

Definition at line 989 of file acutest.h.

◆ line_end

char* line_end

Definition at line 990 of file acutest.h.

◆ log_entry

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

Definition at line 922 of file acutest.h.

◆ log_tail

Definition at line 940 of file acutest.h.

◆ msg

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

Definition at line 947 of file acutest.h.

◆ n

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

Definition at line 642 of file acutest.h.

◆ reason_len

reason_len
Initial value:
{
va_list args

Definition at line 813 of file acutest.h.

◆ result_color

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

Definition at line 858 of file acutest.h.

◆ result_str

result_str = "failed"

Definition at line 880 of file acutest.h.

◆ verbose_level

verbose_level = 2

Definition at line 859 of file acutest.h.