CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
greatest.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include <time.h>
Include dependency graph for greatest.h:

Go to the source code of this file.

Classes

struct  greatest_suite_info
struct  greatest_type_info
struct  greatest_run_info

Macros

#define GREATEST_VERSION_MAJOR   1
#define GREATEST_VERSION_MINOR   0
#define GREATEST_VERSION_PATCH   0
#define GREATEST_DEFAULT_WIDTH   72
#define GREATEST_STDOUT   stdout
#define GREATEST_USE_ABBREVS   1
#define GREATEST_USE_LONGJMP   1
#define GREATEST_USE_TIME   1
#define GREATEST_FLOAT   double
#define GREATEST_FLOAT_FMT   "%g"
#define GREATEST_SUITE(NAME)
#define GREATEST_TEST   static greatest_test_res
#define GREATEST_RUN_SUITE(S_NAME)
#define GREATEST_RUN_TEST(TEST)
#define GREATEST_RUN_TEST1(TEST, ENV)
#define GREATEST_IS_VERBOSE()
#define GREATEST_LIST_ONLY()
#define GREATEST_FIRST_FAIL()
#define GREATEST_FAILURE_ABORT()
#define GREATEST_PASS()
#define GREATEST_FAIL()
#define GREATEST_SKIP()
#define GREATEST_ASSERT(COND)
#define GREATEST_ASSERT_OR_LONGJMP(COND)
#define GREATEST_ASSERT_FALSE(COND)
#define GREATEST_ASSERT_EQ(EXP, GOT)
#define GREATEST_ASSERT_EQ_FMT(EXP, GOT, FMT)
#define GREATEST_ASSERT_IN_RANGE(EXP, GOT, TOL)
#define GREATEST_ASSERT_EQUAL_T(EXP, GOT, TYPE_INFO, UDATA)
#define GREATEST_ASSERT_STR_EQ(EXP, GOT)
#define GREATEST_ASSERTm(MSG, COND)
#define GREATEST_ASSERT_OR_LONGJMPm(MSG, COND)
#define GREATEST_ASSERT_FALSEm(MSG, COND)
#define GREATEST_ASSERT_EQm(MSG, EXP, GOT)
#define GREATEST_ASSERT_EQ_FMTm(MSG, EXP, GOT, FMT)
#define GREATEST_ASSERT_IN_RANGEm(MSG, EXP, GOT, TOL)
#define GREATEST_ASSERT_STR_EQm(MSG, EXP, GOT)
#define GREATEST_ASSERT_EQUAL_Tm(MSG, EXP, GOT, TYPE_INFO, UDATA)
#define GREATEST_PASSm(MSG)
#define GREATEST_FAILm(MSG)
#define GREATEST_FAIL_WITH_LONGJMP()
#define GREATEST_FAIL_WITH_LONGJMPm(MSG)
#define GREATEST_SKIPm(MSG)
#define GREATEST_CHECK_CALL(RES)
#define GREATEST_SET_TIME(NAME)
#define GREATEST_CLOCK_DIFF(C1, C2)
#define GREATEST_SAVE_CONTEXT()
#define GREATEST_MAIN_DEFS()
#define GREATEST_INIT()
#define GREATEST_MAIN_BEGIN()
#define GREATEST_REPORT()
#define GREATEST_MAIN_END()
#define TEST   GREATEST_TEST
#define SUITE   GREATEST_SUITE
#define RUN_TEST   GREATEST_RUN_TEST
#define RUN_TEST1   GREATEST_RUN_TEST1
#define RUN_SUITE   GREATEST_RUN_SUITE
#define ASSERT   GREATEST_ASSERT
#define ASSERTm   GREATEST_ASSERTm
#define ASSERT_FALSE   GREATEST_ASSERT_FALSE
#define ASSERT_EQ   GREATEST_ASSERT_EQ
#define ASSERT_EQ_FMT   GREATEST_ASSERT_EQ_FMT
#define ASSERT_IN_RANGE   GREATEST_ASSERT_IN_RANGE
#define ASSERT_EQUAL_T   GREATEST_ASSERT_EQUAL_T
#define ASSERT_STR_EQ   GREATEST_ASSERT_STR_EQ
#define ASSERT_FALSEm   GREATEST_ASSERT_FALSEm
#define ASSERT_EQm   GREATEST_ASSERT_EQm
#define ASSERT_EQ_FMTm   GREATEST_ASSERT_EQ_FMTm
#define ASSERT_IN_RANGEm   GREATEST_ASSERT_IN_RANGEm
#define ASSERT_EQUAL_Tm   GREATEST_ASSERT_EQUAL_Tm
#define ASSERT_STR_EQm   GREATEST_ASSERT_STR_EQm
#define PASS   GREATEST_PASS
#define FAIL   GREATEST_FAIL
#define SKIP   GREATEST_SKIP
#define PASSm   GREATEST_PASSm
#define FAILm   GREATEST_FAILm
#define SKIPm   GREATEST_SKIPm
#define SET_SETUP   GREATEST_SET_SETUP_CB
#define SET_TEARDOWN   GREATEST_SET_TEARDOWN_CB
#define CHECK_CALL   GREATEST_CHECK_CALL
#define ASSERT_OR_LONGJMP   GREATEST_ASSERT_OR_LONGJMP
#define ASSERT_OR_LONGJMPm   GREATEST_ASSERT_OR_LONGJMPm
#define FAIL_WITH_LONGJMP   GREATEST_FAIL_WITH_LONGJMP
#define FAIL_WITH_LONGJMPm   GREATEST_FAIL_WITH_LONGJMPm

Typedefs

typedef struct greatest_suite_info greatest_suite_info
typedef void greatest_suite_cb(void)
typedef void greatest_setup_cb(void *udata)
typedef void greatest_teardown_cb(void *udata)
typedef int greatest_equal_cb(const void *exp, const void *got, void *udata)
typedef int greatest_printf_cb(const void *t, void *udata)
typedef struct greatest_type_info greatest_type_info
typedef struct greatest_run_info greatest_run_info

Enumerations

enum  GREATEST_FLAG { GREATEST_FLAG_VERBOSE = 0x01 , GREATEST_FLAG_FIRST_FAIL = 0x02 , GREATEST_FLAG_LIST_ONLY = 0x04 }
enum  greatest_test_res { GREATEST_TEST_RES_PASS = 0 , GREATEST_TEST_RES_FAIL = -1 , GREATEST_TEST_RES_SKIP = 1 }

Functions

void greatest_do_pass (const char *name)
void greatest_do_fail (const char *name)
void greatest_do_skip (const char *name)
int greatest_pre_test (const char *name)
void greatest_post_test (const char *name, int res)
void greatest_usage (const char *name)
int greatest_do_assert_equal_t (const void *exp, const void *got, greatest_type_info *type_info, void *udata)
void GREATEST_SET_SETUP_CB (greatest_setup_cb *cb, void *udata)
void GREATEST_SET_TEARDOWN_CB (greatest_teardown_cb *cb, void *udata)
int greatest_all_passed (void)

Variables

greatest_type_info greatest_type_info_string
greatest_run_info greatest_info

Macro Definition Documentation

◆ ASSERT

#define ASSERT   GREATEST_ASSERT

◆ ASSERT_EQ

#define ASSERT_EQ   GREATEST_ASSERT_EQ

◆ ASSERT_EQ_FMT

#define ASSERT_EQ_FMT   GREATEST_ASSERT_EQ_FMT

◆ ASSERT_EQ_FMTm

#define ASSERT_EQ_FMTm   GREATEST_ASSERT_EQ_FMTm

◆ ASSERT_EQm

#define ASSERT_EQm   GREATEST_ASSERT_EQm

◆ ASSERT_EQUAL_T

#define ASSERT_EQUAL_T   GREATEST_ASSERT_EQUAL_T

◆ ASSERT_EQUAL_Tm

#define ASSERT_EQUAL_Tm   GREATEST_ASSERT_EQUAL_Tm

◆ ASSERT_FALSE

#define ASSERT_FALSE   GREATEST_ASSERT_FALSE

◆ ASSERT_FALSEm

#define ASSERT_FALSEm   GREATEST_ASSERT_FALSEm

◆ ASSERT_IN_RANGE

#define ASSERT_IN_RANGE   GREATEST_ASSERT_IN_RANGE

◆ ASSERT_IN_RANGEm

#define ASSERT_IN_RANGEm   GREATEST_ASSERT_IN_RANGEm

◆ ASSERT_OR_LONGJMP

#define ASSERT_OR_LONGJMP   GREATEST_ASSERT_OR_LONGJMP

◆ ASSERT_OR_LONGJMPm

#define ASSERT_OR_LONGJMPm   GREATEST_ASSERT_OR_LONGJMPm

◆ ASSERT_STR_EQ

#define ASSERT_STR_EQ   GREATEST_ASSERT_STR_EQ

◆ ASSERT_STR_EQm

#define ASSERT_STR_EQm   GREATEST_ASSERT_STR_EQm

◆ ASSERTm

#define ASSERTm   GREATEST_ASSERTm

◆ CHECK_CALL

#define CHECK_CALL   GREATEST_CHECK_CALL

◆ FAIL

#define FAIL   GREATEST_FAIL

◆ FAIL_WITH_LONGJMP

#define FAIL_WITH_LONGJMP   GREATEST_FAIL_WITH_LONGJMP

◆ FAIL_WITH_LONGJMPm

#define FAIL_WITH_LONGJMPm   GREATEST_FAIL_WITH_LONGJMPm

◆ FAILm

#define FAILm   GREATEST_FAILm

◆ GREATEST_ASSERT

#define GREATEST_ASSERT ( COND)
Value:
GREATEST_ASSERTm(#COND, COND)
#define GREATEST_ASSERTm(MSG, COND)
Definition greatest.h:356

◆ GREATEST_ASSERT_EQ

#define GREATEST_ASSERT_EQ ( EXP,
GOT )
Value:
GREATEST_ASSERT_EQm(#EXP " != " #GOT, EXP, GOT)
#define GREATEST_ASSERT_EQm(MSG, EXP, GOT)
Definition greatest.h:377

◆ GREATEST_ASSERT_EQ_FMT

#define GREATEST_ASSERT_EQ_FMT ( EXP,
GOT,
FMT )
Value:
GREATEST_ASSERT_EQ_FMTm(#EXP " != " #GOT, EXP, GOT, FMT)
#define GREATEST_ASSERT_EQ_FMTm(MSG, EXP, GOT, FMT)
Definition greatest.h:384

◆ GREATEST_ASSERT_EQ_FMTm

#define GREATEST_ASSERT_EQ_FMTm ( MSG,
EXP,
GOT,
FMT )
Value:
do { \
greatest_info.assertions++; \
const char *fmt = ( FMT ); \
if ((EXP) != (GOT)) { \
fprintf(GREATEST_STDOUT, "\nExpected: "); \
fprintf(GREATEST_STDOUT, fmt, EXP); \
fprintf(GREATEST_STDOUT, "\nGot: "); \
fprintf(GREATEST_STDOUT, fmt, GOT); \
fprintf(GREATEST_STDOUT, "\n"); \
GREATEST_FAILm(MSG); \
} \
} while (0)
#define GREATEST_STDOUT
Definition greatest.h:99
greatest_run_info greatest_info

◆ GREATEST_ASSERT_EQm

#define GREATEST_ASSERT_EQm ( MSG,
EXP,
GOT )
Value:
do { \
greatest_info.assertions++; \
if ((EXP) != (GOT)) { GREATEST_FAILm(MSG); } \
} while (0)
#define GREATEST_FAILm(MSG)
Definition greatest.h:448

◆ GREATEST_ASSERT_EQUAL_T

#define GREATEST_ASSERT_EQUAL_T ( EXP,
GOT,
TYPE_INFO,
UDATA )
Value:
GREATEST_ASSERT_EQUAL_Tm(#EXP " != " #GOT, EXP, GOT, TYPE_INFO, UDATA)
#define GREATEST_ASSERT_EQUAL_Tm(MSG, EXP, GOT, TYPE_INFO, UDATA)
Definition greatest.h:426

◆ GREATEST_ASSERT_EQUAL_Tm

#define GREATEST_ASSERT_EQUAL_Tm ( MSG,
EXP,
GOT,
TYPE_INFO,
UDATA )
Value:
do { \
greatest_type_info *type_info = (TYPE_INFO); \
greatest_info.assertions++; \
if (!greatest_do_assert_equal_t(EXP, GOT, \
type_info, UDATA)) { \
if (type_info == NULL || type_info->equal == NULL) { \
GREATEST_FAILm("type_info->equal callback missing!"); \
} else { \
GREATEST_FAILm(MSG); \
} \
} \
} while (0) \
int greatest_do_assert_equal_t(const void *exp, const void *got, greatest_type_info *type_info, void *udata)
Definition greatest.h:171
greatest_equal_cb * equal
Definition greatest.h:172

◆ GREATEST_ASSERT_FALSE

#define GREATEST_ASSERT_FALSE ( COND)
Value:
#define GREATEST_ASSERT_FALSEm(MSG, COND)
Definition greatest.h:370

◆ GREATEST_ASSERT_FALSEm

#define GREATEST_ASSERT_FALSEm ( MSG,
COND )
Value:
do { \
greatest_info.assertions++; \
if ((COND)) { GREATEST_FAILm(MSG); } \
} while (0)

◆ GREATEST_ASSERT_IN_RANGE

#define GREATEST_ASSERT_IN_RANGE ( EXP,
GOT,
TOL )
Value:
GREATEST_ASSERT_IN_RANGEm(#EXP " != " #GOT " +/- " #TOL, EXP, GOT, TOL)
#define GREATEST_ASSERT_IN_RANGEm(MSG, EXP, GOT, TOL)
Definition greatest.h:399

◆ GREATEST_ASSERT_IN_RANGEm

#define GREATEST_ASSERT_IN_RANGEm ( MSG,
EXP,
GOT,
TOL )
Value:
do { \
greatest_info.assertions++; \
GREATEST_FLOAT exp = (EXP); \
GREATEST_FLOAT got = (GOT); \
GREATEST_FLOAT tol = (TOL); \
if ((exp > got && exp - got > tol) || \
(exp < got && got - exp > tol)) { \
fprintf(GREATEST_STDOUT, \
"\nExpected: " GREATEST_FLOAT_FMT \
" +/- " GREATEST_FLOAT_FMT "\n" \
"Got: " GREATEST_FLOAT_FMT "\n", \
exp, tol, got); \
GREATEST_FAILm(MSG); \
} \
} while (0)
#define GREATEST_FLOAT
Definition greatest.h:127
#define GREATEST_FLOAT_FMT
Definition greatest.h:128

◆ GREATEST_ASSERT_OR_LONGJMP

#define GREATEST_ASSERT_OR_LONGJMP ( COND)
Value:
#define GREATEST_ASSERT_OR_LONGJMPm(MSG, COND)
Definition greatest.h:363

◆ GREATEST_ASSERT_OR_LONGJMPm

#define GREATEST_ASSERT_OR_LONGJMPm ( MSG,
COND )
Value:
do { \
greatest_info.assertions++; \
if (!(COND)) { GREATEST_FAIL_WITH_LONGJMPm(MSG); } \
} while (0)
#define GREATEST_FAIL_WITH_LONGJMPm(MSG)
Definition greatest.h:459

◆ GREATEST_ASSERT_STR_EQ

#define GREATEST_ASSERT_STR_EQ ( EXP,
GOT )
Value:
GREATEST_ASSERT_STR_EQm(#EXP " != " #GOT, EXP, GOT)
#define GREATEST_ASSERT_STR_EQm(MSG, EXP, GOT)
Definition greatest.h:417

◆ GREATEST_ASSERT_STR_EQm

#define GREATEST_ASSERT_STR_EQm ( MSG,
EXP,
GOT )
Value:
do { \
GREATEST_ASSERT_EQUAL_Tm(MSG, EXP, GOT, \
} while (0) \
greatest_type_info greatest_type_info_string

◆ GREATEST_ASSERTm

#define GREATEST_ASSERTm ( MSG,
COND )
Value:
do { \
greatest_info.assertions++; \
if (!(COND)) { GREATEST_FAILm(MSG); } \
} while (0)

◆ GREATEST_CHECK_CALL

#define GREATEST_CHECK_CALL ( RES)
Value:
do { \
int _check_call_res = RES; \
if (_check_call_res != GREATEST_TEST_RES_PASS) { \
return _check_call_res; \
} \
} while (0) \
@ GREATEST_TEST_RES_PASS
Definition greatest.h:278

◆ GREATEST_CLOCK_DIFF

#define GREATEST_CLOCK_DIFF ( C1,
C2 )
Value:
fprintf(GREATEST_STDOUT, " (%lu ticks, %.3f sec)", \
(long unsigned int) (C2) - (long unsigned int)(C1), \
(double)((C2) - (C1)) / (1.0 * (double)CLOCKS_PER_SEC))

◆ GREATEST_DEFAULT_WIDTH

#define GREATEST_DEFAULT_WIDTH   72

◆ GREATEST_FAIL

#define GREATEST_FAIL ( )
Value:

◆ GREATEST_FAIL_WITH_LONGJMP

#define GREATEST_FAIL_WITH_LONGJMP ( )

◆ GREATEST_FAIL_WITH_LONGJMPm

#define GREATEST_FAIL_WITH_LONGJMPm ( MSG)
Value:
do { \
greatest_info.fail_file = __FILE__; \
greatest_info.fail_line = __LINE__; \
greatest_info.msg = MSG; \
longjmp(greatest_info.jump_dest, GREATEST_TEST_RES_FAIL); \
} while (0)
@ GREATEST_TEST_RES_FAIL
Definition greatest.h:279

◆ GREATEST_FAILm

#define GREATEST_FAILm ( MSG)
Value:
do { \
greatest_info.fail_file = __FILE__; \
greatest_info.fail_line = __LINE__; \
greatest_info.msg = MSG; \
} while (0)

◆ GREATEST_FAILURE_ABORT

#define GREATEST_FAILURE_ABORT ( )
Value:
(greatest_info.suite.failed > 0 && GREATEST_FIRST_FAIL())
#define GREATEST_FIRST_FAIL()
Definition greatest.h:328

◆ GREATEST_FIRST_FAIL

#define GREATEST_FIRST_FAIL ( )
Value:
@ GREATEST_FLAG_FIRST_FAIL
Definition greatest.h:181

◆ GREATEST_FLOAT

#define GREATEST_FLOAT   double

◆ GREATEST_FLOAT_FMT

#define GREATEST_FLOAT_FMT   "%g"

◆ GREATEST_INIT

#define GREATEST_INIT ( )
Value:
do { \
memset(&greatest_info, 0, sizeof(greatest_info)); \
GREATEST_SET_TIME(greatest_info.begin); \
} while (0) \
#define GREATEST_DEFAULT_WIDTH
Definition greatest.h:94

◆ GREATEST_IS_VERBOSE

#define GREATEST_IS_VERBOSE ( )
Value:
@ GREATEST_FLAG_VERBOSE
Definition greatest.h:180

◆ GREATEST_LIST_ONLY

#define GREATEST_LIST_ONLY ( )
Value:
@ GREATEST_FLAG_LIST_ONLY
Definition greatest.h:182

◆ GREATEST_MAIN_BEGIN

#define GREATEST_MAIN_BEGIN ( )

◆ GREATEST_MAIN_DEFS

#define GREATEST_MAIN_DEFS ( )

◆ GREATEST_MAIN_END

#define GREATEST_MAIN_END ( )
Value:
do { \
GREATEST_REPORT(); \
return (greatest_all_passed() ? EXIT_SUCCESS : EXIT_FAILURE); \
} while (0)
int greatest_all_passed(void)

◆ GREATEST_PASS

#define GREATEST_PASS ( )
Value:
#define GREATEST_PASSm(MSG)
Definition greatest.h:441

◆ GREATEST_PASSm

#define GREATEST_PASSm ( MSG)
Value:
do { \
greatest_info.msg = MSG; \
} while (0)

◆ GREATEST_REPORT

#define GREATEST_REPORT ( )
Value:
do { \
if (!GREATEST_LIST_ONLY()) { \
GREATEST_SET_TIME(greatest_info.end); \
fprintf(GREATEST_STDOUT, \
"\nTotal: %u tests", greatest_info.tests_run); \
GREATEST_CLOCK_DIFF(greatest_info.begin, \
greatest_info.end); \
fprintf(GREATEST_STDOUT, ", %u assertions\n", \
greatest_info.assertions); \
fprintf(GREATEST_STDOUT, \
"Pass: %u, fail: %u, skip: %u.\n", \
greatest_info.passed, \
greatest_info.failed, greatest_info.skipped); \
} \
} while (0)
#define GREATEST_LIST_ONLY()
Definition greatest.h:327

◆ GREATEST_RUN_SUITE

#define GREATEST_RUN_SUITE ( S_NAME)
Value:
greatest_run_suite(S_NAME, #S_NAME)

◆ GREATEST_RUN_TEST

#define GREATEST_RUN_TEST ( TEST)
Value:
do { \
if (greatest_pre_test(#TEST) == 1) { \
if (res == GREATEST_TEST_RES_PASS) { \
res = TEST(); \
} \
greatest_post_test(#TEST, res); \
} else if (GREATEST_LIST_ONLY()) { \
fprintf(GREATEST_STDOUT, " %s\n", #TEST); \
} \
} while (0)
greatest_test_res
Definition greatest.h:277
#define GREATEST_SAVE_CONTEXT()
Definition greatest.h:503
#define TEST
Definition greatest.h:795
int greatest_pre_test(const char *name)

◆ GREATEST_RUN_TEST1

#define GREATEST_RUN_TEST1 ( TEST,
ENV )
Value:
do { \
if (greatest_pre_test(#TEST) == 1) { \
int res = TEST(ENV); \
greatest_post_test(#TEST, res); \
} else if (GREATEST_LIST_ONLY()) { \
fprintf(GREATEST_STDOUT, " %s\n", #TEST); \
} \
} while (0)

◆ GREATEST_SAVE_CONTEXT

#define GREATEST_SAVE_CONTEXT ( )
Value:
/* setjmp returns 0 (GREATEST_TEST_RES_PASS) on first call */ \
/* so the test runs, then RES_FAIL from FAIL_WITH_LONGJMP. */ \
((greatest_test_res)(setjmp(greatest_info.jump_dest)))

◆ GREATEST_SET_TIME

#define GREATEST_SET_TIME ( NAME)
Value:
NAME = clock(); \
if (NAME == (clock_t) -1) { \
fprintf(GREATEST_STDOUT, \
"clock error: %s\n", #NAME); \
exit(EXIT_FAILURE); \
}

◆ GREATEST_SKIP

#define GREATEST_SKIP ( )
Value:
#define GREATEST_SKIPm(MSG)
Definition greatest.h:469

◆ GREATEST_SKIPm

#define GREATEST_SKIPm ( MSG)
Value:
do { \
greatest_info.msg = MSG; \
} while (0)
@ GREATEST_TEST_RES_SKIP
Definition greatest.h:280

◆ GREATEST_STDOUT

#define GREATEST_STDOUT   stdout

◆ GREATEST_SUITE

#define GREATEST_SUITE ( NAME)
Value:
void NAME(void); void NAME(void)

◆ GREATEST_TEST

#define GREATEST_TEST   static greatest_test_res

◆ GREATEST_USE_ABBREVS

#define GREATEST_USE_ABBREVS   1

◆ GREATEST_USE_LONGJMP

#define GREATEST_USE_LONGJMP   1

◆ GREATEST_USE_TIME

#define GREATEST_USE_TIME   1

◆ GREATEST_VERSION_MAJOR

#define GREATEST_VERSION_MAJOR   1

◆ GREATEST_VERSION_MINOR

#define GREATEST_VERSION_MINOR   0

◆ GREATEST_VERSION_PATCH

#define GREATEST_VERSION_PATCH   0

◆ PASS

#define PASS   GREATEST_PASS

◆ PASSm

#define PASSm   GREATEST_PASSm

◆ RUN_SUITE

#define RUN_SUITE   GREATEST_RUN_SUITE

◆ RUN_TEST

#define RUN_TEST   GREATEST_RUN_TEST

◆ RUN_TEST1

#define RUN_TEST1   GREATEST_RUN_TEST1

◆ SET_SETUP

#define SET_SETUP   GREATEST_SET_SETUP_CB

◆ SET_TEARDOWN

#define SET_TEARDOWN   GREATEST_SET_TEARDOWN_CB

◆ SKIP

#define SKIP   GREATEST_SKIP

◆ SKIPm

#define SKIPm   GREATEST_SKIPm

◆ SUITE

#define SUITE   GREATEST_SUITE

◆ TEST

#define TEST   GREATEST_TEST

Typedef Documentation

◆ greatest_equal_cb

typedef int greatest_equal_cb(const void *exp, const void *got, void *udata)

◆ greatest_printf_cb

typedef int greatest_printf_cb(const void *t, void *udata)

◆ greatest_run_info

typedef struct greatest_run_info greatest_run_info

◆ greatest_setup_cb

typedef void greatest_setup_cb(void *udata)

◆ greatest_suite_cb

typedef void greatest_suite_cb(void)

◆ greatest_suite_info

typedef struct greatest_suite_info greatest_suite_info

◆ greatest_teardown_cb

typedef void greatest_teardown_cb(void *udata)

◆ greatest_type_info

typedef struct greatest_type_info greatest_type_info

Enumeration Type Documentation

◆ GREATEST_FLAG

Enumerator
GREATEST_FLAG_VERBOSE 
GREATEST_FLAG_FIRST_FAIL 
GREATEST_FLAG_LIST_ONLY 

◆ greatest_test_res

Enumerator
GREATEST_TEST_RES_PASS 
GREATEST_TEST_RES_FAIL 
GREATEST_TEST_RES_SKIP 

Function Documentation

◆ greatest_all_passed()

int greatest_all_passed ( void )

◆ greatest_do_assert_equal_t()

int greatest_do_assert_equal_t ( const void * exp,
const void * got,
greatest_type_info * type_info,
void * udata )

◆ greatest_do_fail()

void greatest_do_fail ( const char * name)

◆ greatest_do_pass()

void greatest_do_pass ( const char * name)

◆ greatest_do_skip()

void greatest_do_skip ( const char * name)

◆ greatest_post_test()

void greatest_post_test ( const char * name,
int res )

◆ greatest_pre_test()

int greatest_pre_test ( const char * name)

◆ GREATEST_SET_SETUP_CB()

void GREATEST_SET_SETUP_CB ( greatest_setup_cb * cb,
void * udata )

◆ GREATEST_SET_TEARDOWN_CB()

void GREATEST_SET_TEARDOWN_CB ( greatest_teardown_cb * cb,
void * udata )

◆ greatest_usage()

void greatest_usage ( const char * name)

Variable Documentation

◆ greatest_info

greatest_run_info greatest_info
extern

◆ greatest_type_info_string

greatest_type_info greatest_type_info_string
extern