mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-09 08:56:15 +00:00
64 lines
1.7 KiB
C
64 lines
1.7 KiB
C
#ifndef CHECK_CHECK_H
|
|
#define CHECK_CHECK_H
|
|
|
|
#ifndef TIMEOUT_TESTS_ENABLED
|
|
#define TIMEOUT_TESTS_ENABLED 1
|
|
#endif
|
|
|
|
/*
|
|
* Certain unit tests are known to leak memory. This
|
|
* #define will prevent those unit tests from being built
|
|
* if the program is to be used against valgrind.
|
|
*/
|
|
#ifndef MEMORY_LEAKING_TESTS_ENABLED
|
|
#define MEMORY_LEAKING_TESTS_ENABLED 1
|
|
#endif
|
|
|
|
extern int sub_ntests;
|
|
|
|
void fork_setup (void);
|
|
void fork_teardown (void);
|
|
void setup_fixture(void);
|
|
void teardown_fixture (void);
|
|
void setup (void);
|
|
void cleanup (void);
|
|
Suite *make_sub_suite(void);
|
|
Suite *make_sub2_suite(void);
|
|
Suite *make_master_suite(void);
|
|
Suite *make_list_suite(void);
|
|
Suite *make_msg_suite(void);
|
|
Suite *make_log_suite(void);
|
|
Suite *make_log_internal_suite(void);
|
|
Suite *make_limit_suite(void);
|
|
Suite *make_fork_suite(void);
|
|
Suite *make_fixture_suite(void);
|
|
Suite *make_pack_suite(void);
|
|
Suite *make_exit_suite(void);
|
|
Suite *make_selective_suite(void);
|
|
|
|
extern int master_tests_lineno[];
|
|
void init_master_tests_lineno(int num_master_tests);
|
|
|
|
/**
|
|
* Record a line number for a test which is to fail.
|
|
*
|
|
* This is used to record the failure line numbers for
|
|
* all tests in check_check_sub.c. Simply make this
|
|
* call right before an assert to record the proper
|
|
* line number. The line number is adjusted +1 internally,
|
|
* to account for making this call before the failure.
|
|
*/
|
|
void record_failure_line_num(const int line);
|
|
|
|
/**
|
|
* Once the failure file numbers have been recorded
|
|
* to file and the file has been rewind(), this
|
|
* call will extract the next line number from the
|
|
* file.
|
|
*
|
|
* If there are no more lines to read, -1 is returned.
|
|
*/
|
|
int get_next_failure_line_num(FILE * file);
|
|
|
|
#endif /* CHECK_CHECK_H */
|