123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468 |
- add_all_tests(
- add_all_tests(
- TEST_FIXTURE_TYPE *fixture = set_up(TEST_CASE_NAME); \
- int result = 0
- if (fixture != NULL) {\
- result = execute_func(fixture);\
- tear_down(fixture);\
- }
- const char *test_get_program_name(void);
- char *test_get_argument(size_t n);
- size_t test_get_argument_count(void);
- int test_has_option(const char *option);
- const char *test_get_option_argument(const char *option);
- void add_test(const char *test_case_name, int (*test_fn) (void));
- void add_all_tests(const char *test_case_name, int (*test_fn)(int idx), int num,
- int subtest);
- int global_init(void);
- int setup_tests(void);
- void cleanup_tests(void);
-
- int test_
- const char *, const char *, \
- const type, const type);
- DECLARE_COMPARISON(type, name, eq) \
- DECLARE_COMPARISON(type, name, ne) \
- DECLARE_COMPARISON(type, name, lt) \
- DECLARE_COMPARISON(type, name, le) \
- DECLARE_COMPARISON(type, name, gt) \
- DECLARE_COMPARISON(type, name, ge)
- DECLARE_COMPARISONS(int, int)
- DECLARE_COMPARISONS(unsigned int, uint)
- DECLARE_COMPARISONS(char, char)
- DECLARE_COMPARISONS(unsigned char, uchar)
- DECLARE_COMPARISONS(long, long)
- DECLARE_COMPARISONS(unsigned long, ulong)
- DECLARE_COMPARISONS(time_t, time_t)
- DECLARE_COMPARISONS(size_t, size_t)
- DECLARE_COMPARISON(void *, ptr, eq)
- DECLARE_COMPARISON(void *, ptr, ne)
- int test_ptr(const char *file, int line, const char *s, const void *p);
- int test_ptr_null(const char *file, int line, const char *s, const void *p);
- DECLARE_COMPARISON(char *, str, eq)
- DECLARE_COMPARISON(char *, str, ne)
- int test_strn_eq(const char *file, int line, const char *, const char *,
- const char *a, const char *b, size_t s);
- int test_strn_ne(const char *file, int line, const char *, const char *,
- const char *a, const char *b, size_t s);
- int test_mem_eq(const char *, int, const char *, const char *,
- const void *, size_t, const void *, size_t);
- int test_mem_ne(const char *, int, const char *, const char *,
- const void *, size_t, const void *, size_t);
- int test_true(const char *file, int line, const char *s, int b);
- int test_false(const char *file, int line, const char *s, int b);
- DECLARE_COMPARISONS(BIGNUM *, BN)
- int test_BN_eq_zero(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_ne_zero(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_lt_zero(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_le_zero(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_gt_zero(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_ge_zero(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_eq_one(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_odd(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_even(const char *file, int line, const char *s, const BIGNUM *a);
- int test_BN_eq_word(const char *file, int line, const char *bns, const char *ws,
- const BIGNUM *a, BN_ULONG w);
- int test_BN_abs_eq_word(const char *file, int line, const char *bns,
- const char *ws, const BIGNUM *a, BN_ULONG w);
- void test_error(const char *file, int line, const char *desc, ...)
- PRINTF_FORMAT(3, 4);
- void test_error_c90(const char *desc, ...) PRINTF_FORMAT(1, 2);
- void test_info(const char *file, int line, const char *desc, ...)
- PRINTF_FORMAT(3, 4);
- void test_info_c90(const char *desc, ...) PRINTF_FORMAT(1, 2);
- void test_note(const char *desc, ...) PRINTF_FORMAT(1, 2);
- void test_openssl_errors(void);
- void test_perror(const char *s);
- extern BIO *bio_out;
- extern BIO *bio_err;
- void test_output_string(const char *name, const char *m, size_t l);
- void test_output_bignum(const char *name, const BIGNUM *bn);
- void test_output_memory(const char *name, const unsigned char *m, size_t l);
- typedef struct pair_st {
- char *key;
- char *value;
- } PAIR;
- typedef struct stanza_st {
- const char *test_file;
- BIO *fp;
- int curr;
- int start;
- int errors;
- int numtests;
- int numskip;
- int numpairs;
- PAIR pairs[TESTMAXPAIRS];
- BIO *key;
- char buff[4096];
- } STANZA;
- int test_start_file(STANZA *s, const char *testfile);
- int test_end_file(STANZA *s);
- int test_readstanza(STANZA *s);
- void test_clearstanza(STANZA *s);
- char *glue_strings(const char *list[], size_t *out_len);
- uint32_t test_random(void);
- void test_random_seed(uint32_t sd);
- char *test_mk_file_path(const char *dir, const char *file);
|