# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = Check
-PROJECT_NUMBER = 0.6.1
+PROJECT_NUMBER = 0.7.0
OUTPUT_DIRECTORY = /home/amalec/check/doc/
OUTPUT_LANGUAGE = English
-EXTRACT_ALL = YES
+EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = NO
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
-HTML_OUTPUT = html
+HTML_OUTPUT =
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
-LATEX_OUTPUT = latex
+LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = letter
EXTRA_PACKAGES =
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
-GENERATE_RTF = YES
+GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
-GENERATE_MAN = YES
+GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
#---------------------------------------------------------------------------
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/*! \mainpage Check: a unit test framework for C
+
+\section overview Overview
+Check is a unit test framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so Check can catch both assertion failures and code errors that cause segmentation faults or other signals. The output from unit tests can be used within source code editors and IDEs.
+
+\section quickref Quick Reference
+
+\subsection creating Creating
+
+\par
+Unit tests are created with the #START_TEST/#END_TEST macro pair. The #fail_unless and #fail macros are used for creating checks within unit tests; the #mark_point macro is useful for trapping the location of signals and/or early exits.
+
+\subsection managing Managing test cases and suites
+
+\par
+Test cases are created with #tcase_create, unit tests are added with #tcase_add_test
+\par
+Suites are created with #suite_create, freed with #suite_free; test cases are added with #suite_add_tcase
+
+\subsection running Running suites
+
+\par Suites are run through an SRunner, which is created with #srunner_create, freed with #srunner_free
+
+\par Use #srunner_run_all to run a suite and print results.
+
+*/
+
+/*! \file check.h */
+
/*! Magic values */
enum {
CMAXMSG = 100, /*! maximum length of a message, including terminating nul */
};
-/* Core suite/test case types and functions */
+/*! \defgroup check_core Check Core
+ Core suite/test case types and functions
+ @{
+*/
-/*! opaque type for a test suite */
+/*! \brief opaque type for a test suite */
typedef struct Suite Suite;
-/*! opaque type for a test case
+/*! \brief opaque type for a test case
+ A TCase represents a test case.
+ Create with #tcase_create, free with #tcase_free.
For the moment, test cases can only be run through a suite */
typedef struct TCase TCase;
#define START_TEST(__testname)\
void __testname (int __msqid)\
{\
- tcase_fn_start (__msqid,""# __testname, __FILE__, __LINE__);\
+ tcase_fn_start (__msqid,""# __testname, __FILE__, __LINE__);
+/*! End a unit test */
#define END_TEST }
#define mark_point() _mark_point(__msqid,__FILE__,__LINE__)
void _mark_point (int msqid, char *file, int line);
-/* Suite running functions */
+/*! @} */
+
+/*! \defgroup check_run Suite running functions
+ @{
+*/
/*! Result of a test */
/* Test running */
/*! Runs an SRunner, printing results as specified
- (see enum print_verbosity)*/
+ (see enum #print_verbosity)*/
void srunner_run_all (SRunner *sr, int print_mode);
/* Next functions are valid only after the suite has been
/*! Total number of tests run in a run suite */
int srunner_ntests_run (SRunner *sr);
-/*! Return an array of results for all failures
- Number of failures is equal to srunner_nfailed_tests
+/*! \brief Return an array of results for all failures
+ Number of failures is equal to #srunner_nfailed_tests.
Memory is alloc'ed and must be freed, but individual
TestResults must not */
TestResult **srunner_failures (SRunner *sr);
-/*! Return an array of results for all run tests
- Number of failrues is equal to srunner_ntests_run
+/*! \brief Return an array of results for all run tests
+ Number of failrues is equal to #srunner_ntests_run
Memory is alloc'ed and must be freed, but individual
TestResults must not */
TestResult **srunner_results (SRunner *sr);
/*! Print a summary report of %passed, #checks, failures */
void srunner_print_summary (SRunner *sr);
-/*! Print a detailed report of test results
- See enum print_verbosity for explaination of print_mode*/
+/*! \brief Print a detailed report of test results
+ \param sr SRunner for which results are printed
+ \param print_mode Specification of print verbosity, constrainted to enum #print_verbosity
+*/
void srunner_print_results (SRunner *sr, int print_mode);
+/*! @} */
#endif /* CHECK_H */
have_lyx = @have_lyx@
have_sgmltools = @have_sgmltools@
-TESTS = check_check check_list check_check_msg test_output.sh
+TESTS = check_check check_list check_check_msg check_log test_output.sh
+
+noinst_PROGRAMS = check_check check_list check_stress check_check_msg check_log ex_output
+
-noinst_PROGRAMS = check_check check_list check_stress check_check_msg ex_output
EXTRA_DIST = test_output.sh
+check_log_SOURCES = check_log.c
+
+
check_check_SOURCES = check_check.h check_check_sub.c check_check_master.c check_check_main.c
check_check_msg_LDADD = $(LDADD)
check_check_msg_DEPENDENCIES = ../src/libcheck.a
check_check_msg_LDFLAGS =
+check_log_OBJECTS = check_log.o
+check_log_LDADD = $(LDADD)
+check_log_DEPENDENCIES = ../src/libcheck.a
+check_log_LDFLAGS =
ex_output_OBJECTS = ex_output.o
ex_output_LDADD = $(LDADD)
ex_output_DEPENDENCIES = ../src/libcheck.a
GZIP_ENV = --best
DEP_FILES = .deps/check_check_main.P .deps/check_check_master.P \
.deps/check_check_msg.P .deps/check_check_sub.P .deps/check_list.P \
-.deps/check_stress.P .deps/ex_output.P
-SOURCES = $(check_check_SOURCES) $(check_list_SOURCES) $(check_stress_SOURCES) $(check_check_msg_SOURCES) $(ex_output_SOURCES)
-OBJECTS = $(check_check_OBJECTS) $(check_list_OBJECTS) $(check_stress_OBJECTS) $(check_check_msg_OBJECTS) $(ex_output_OBJECTS)
+.deps/check_log.P .deps/check_stress.P .deps/ex_output.P
+SOURCES = $(check_check_SOURCES) $(check_list_SOURCES) $(check_stress_SOURCES) $(check_check_msg_SOURCES) $(check_log_SOURCES) $(ex_output_SOURCES)
+OBJECTS = $(check_check_OBJECTS) $(check_list_OBJECTS) $(check_stress_OBJECTS) $(check_check_msg_OBJECTS) $(check_log_OBJECTS) $(ex_output_OBJECTS)
all: all-redirect
.SUFFIXES:
@rm -f check_check_msg
$(LINK) $(check_check_msg_LDFLAGS) $(check_check_msg_OBJECTS) $(check_check_msg_LDADD) $(LIBS)
+check_log: $(check_log_OBJECTS) $(check_log_DEPENDENCIES)
+ @rm -f check_log
+ $(LINK) $(check_log_LDFLAGS) $(check_log_OBJECTS) $(check_log_LDADD) $(LIBS)
+
ex_output: $(ex_output_OBJECTS) $(ex_output_DEPENDENCIES)
@rm -f ex_output
$(LINK) $(ex_output_LDFLAGS) $(ex_output_OBJECTS) $(ex_output_LDADD) $(LIBS)