]> granicus.if.org Git - check/commitdiff
Additional doxygenation of check.h
authoramalec <amalec@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 28 Jun 2001 22:33:50 +0000 (22:33 +0000)
committeramalec <amalec@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 28 Jun 2001 22:33:50 +0000 (22:33 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@41 64e312b2-a51f-0410-8e61-82d0ca0eb02a

check/Doxyfile
check/configure
check/configure.in
check/src/check.h
check/tests/Makefile.am
check/tests/Makefile.in

index cb3049514895eb11cd54c7ce3a74a2985c262f8a..1c99c75952c5833ed5474222d0756607f69c4e63 100644 (file)
@@ -3,10 +3,10 @@
 # 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
@@ -70,7 +70,7 @@ IGNORE_PREFIX          =
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 GENERATE_HTML          = YES
-HTML_OUTPUT            = html
+HTML_OUTPUT            = 
 HTML_HEADER            = 
 HTML_FOOTER            = 
 HTML_STYLESHEET        = 
@@ -87,7 +87,7 @@ TREEVIEW_WIDTH         = 250
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 GENERATE_LATEX         = YES
-LATEX_OUTPUT           = latex
+LATEX_OUTPUT           = 
 COMPACT_LATEX          = NO
 PAPER_TYPE             = letter
 EXTRA_PACKAGES         = 
@@ -98,7 +98,7 @@ LATEX_BATCHMODE        = NO
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
-GENERATE_RTF           = YES
+GENERATE_RTF           = NO
 RTF_OUTPUT             = rtf
 COMPACT_RTF            = NO
 RTF_HYPERLINKS         = NO
@@ -106,7 +106,7 @@ RTF_STYLESHEET_FILE    =
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
-GENERATE_MAN           = YES
+GENERATE_MAN           = NO
 MAN_OUTPUT             = man
 MAN_EXTENSION          = .3
 #---------------------------------------------------------------------------
index 89fc9647208ec9494de07bd88c31908ad275004c..64085fc2c26cea76ecf17e391e61bf8c7f9c7fe0 100755 (executable)
@@ -691,7 +691,7 @@ fi
 
 PACKAGE=check
 
-VERSION=0.6.1
+VERSION=0.7.0
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
index fc24b7bfb82acf3c470668da0b4bb7df50795c28..a5be67d6f0791e2abe4fe6f3ad7443823fb08a4f 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(src/check.c)
-AM_INIT_AUTOMAKE(check,0.6.1)
+AM_INIT_AUTOMAKE(check,0.7.0)
 
 dnl Checks for programs.
 AC_PROG_AWK
index 9a1bef33eba3a20752a6848a7bcc911a8ba33dbd..ceafeb59ba5b64f760e4976b03304e1ae300d8f1 100644 (file)
   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; 
 
@@ -78,8 +112,9 @@ void tcase_fn_start (int msqid, char *fname, char *file, int line);
 #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 }
 
 
@@ -95,7 +130,11 @@ void _fail_unless (int msqid, int result, char *file, int line, char *msg);
 #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 */
@@ -142,7 +181,7 @@ void srunner_free (SRunner *sr);
 /* 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
@@ -155,14 +194,14 @@ int srunner_ntests_failed (SRunner *sr);
 /*! 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);
@@ -171,9 +210,12 @@ 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 */
index 6483007c92f7f18e970940557905cd809699b0ca..fd7cea97ee56df25bc8edf5d5085e23d05934d2e 100644 (file)
@@ -1,8 +1,18 @@
-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
 
index fdf25bf7b3728f9a587e6689525f4fa5d993cd68..c35d5c20c30b91d9d508181a96226eb82f15da83 100644 (file)
@@ -67,11 +67,16 @@ VERSION = @VERSION@
 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
 
 
@@ -118,6 +123,10 @@ check_check_msg_OBJECTS =  check_check_msg.o
 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
@@ -135,9 +144,9 @@ TAR = gtar
 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:
@@ -191,6 +200,10 @@ check_check_msg: $(check_check_msg_OBJECTS) $(check_check_msg_DEPENDENCIES)
        @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)