Documentation fixups

svn path=/trunk/; revision=7024
This commit is contained in:
Matthias Clasen 2008-06-12 06:18:14 +00:00
parent c4af067eee
commit 52e1e9304a
2 changed files with 110 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2008-06-12 Matthias Clasen <mclasen@redhat.com>
* glib/gtestutils.c: Documentation fixups
2008-06-11 Matthias Clasen <mclasen@redhat.com> 2008-06-11 Matthias Clasen <mclasen@redhat.com>
* glib/glist.c: Tiny doc fix * glib/glist.c: Tiny doc fix

View File

@ -372,23 +372,77 @@ parse_args (gint *argc_p,
* test random number generator, the name for g_get_prgname() * test random number generator, the name for g_get_prgname()
* and parsing test related command line args. * and parsing test related command line args.
* So far, the following arguments are understood: * So far, the following arguments are understood:
* <informalexample> * <variablelist>
* -l list test cases available in a test executable. * <varlistentry>
* --seed RANDOMSEED provide a random seed to reproduce test runs using random numbers. * <term><option>-l</option></term>
* --verbose run tests verbosely. * <listitem><para>
* -q, --quiet run tests quietly. * list test cases available in a test executable.
* -p TESTPATH execute all tests matching TESTPATH. * </para></listitem>
* -m {perf|slow|thorough|quick} * </varlistentry>
* execute tests according to these test modes: * <varlistentry>
* perf - performance tests, may take long and report results. * <term><option>--seed=<replaceable>RANDOMSEED</replaceable></option></term>
* slow - slow and thorough tests, may take quite long and maximize coverage. * <listitem><para>
* thorough - currently an alias for "slow". * provide a random seed to reproduce test runs using random numbers.
* quick - quick tests, should run really quickly and give good coverage. * </para></listitem>
* --debug-log debug test logging output. * </varlistentry>
* -k, --keep-going gtester specific argument. * <varlistentry>
* --GTestLogFD N gtester specific argument. * <term><option>--verbose</option></term>
* --GTestSkipCount N gtester specific argument. * <listitem><para>run tests verbosely.</para></listitem>
* </informalexample> * </varlistentry>
* <varlistentry>
* <term><option>-q</option>, <option>--quiet</option></term>
* <listitem><para>run tests quietly.</para></listitem>
* </varlistentry>
* <varlistentry>
* <term><option>-p <replaceable>TESTPATH</replaceable></option></term>
* <listitem><para>
* execute all tests matching <replaceable>TESTPATH</replaceable>.
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term><option>-m {perf|slow|thorough|quick}</option></term>
* <listitem><para>
* execute tests according to these test modes:
* <variablelist>
* <varlistentry>
* <term>perf</term>
* <listitem><para>
* performance tests, may take long and report results.
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>slow, thorough</term>
* <listitem><para>
* slow and thorough tests, may take quite long and
* maximize coverage.
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>quick</term>
* <listitem><para>
* quick tests, should run really quickly and give good coverage.
* </para></listitem>
* </varlistentry>
* </variablelist>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term><option>--debug-log</option></term>
* <listitem><para>debug test logging output.</para></listitem>
* </varlistentry>
* <varlistentry>
* <term><option>-k</option>, <option>--keep-going</option></term>
* <listitem><para>gtester-specific argument.</para></listitem>
* </varlistentry>
* <varlistentry>
* <term><option>--GTestLogFD <replaceable>N</replaceable></option></term>
* <listitem><para>gtester-specific argument.</para></listitem>
* </varlistentry>
* <varlistentry>
* <term><option>--GTestSkipCount <replaceable>N</replaceable></option></term>
* <listitem><para>gtester-specific argument.</para></listitem>
* </varlistentry>
* </variablelist>
* *
* Since: 2.16 * Since: 2.16
*/ */
@ -485,9 +539,11 @@ test_run_seed (const gchar *rseed)
* g_test_rand_int: * g_test_rand_int:
* *
* Get a reproducible random integer number. * Get a reproducible random integer number.
*
* The random numbers generated by the g_test_rand_*() family of functions * The random numbers generated by the g_test_rand_*() family of functions
* change with every new test program start, unless the --seed option is * change with every new test program start, unless the --seed option is
* given when starting test programs. * given when starting test programs.
*
* For individual test cases however, the random number generator is * For individual test cases however, the random number generator is
* reseeded, to avoid dependencies between tests and to make --seed * reseeded, to avoid dependencies between tests and to make --seed
* effective for all test cases. * effective for all test cases.
@ -689,6 +745,7 @@ g_test_message (const char *format,
* @uri_pattern: the base pattern for bug URIs * @uri_pattern: the base pattern for bug URIs
* *
* Specify the base URI for bug reports. * Specify the base URI for bug reports.
*
* The base URI is used to construct bug report messages for * The base URI is used to construct bug report messages for
* g_test_message() when g_test_bug() is called. * g_test_message() when g_test_bug() is called.
* Calling this function outside of a test case sets the * Calling this function outside of a test case sets the
@ -1118,7 +1175,8 @@ g_test_run_suite_internal (GTestSuite *suite,
* *
* Execute the tests within @suite and all nested #GTestSuites. * Execute the tests within @suite and all nested #GTestSuites.
* The test suites to be executed are filtered according to * The test suites to be executed are filtered according to
* test path arguments (-p <testpath>) as parsed by g_test_init(). * test path arguments (-p <replaceable>testpath</replaceable>)
* as parsed by g_test_init().
* g_test_run_suite() or g_test_run() may only be called once * g_test_run_suite() or g_test_run() may only be called once
* in a program. * in a program.
* *
@ -1430,22 +1488,40 @@ test_time_stamp (void)
* Fork the current test program to execute a test case that might * Fork the current test program to execute a test case that might
* not return or that might abort. The forked test case is aborted * not return or that might abort. The forked test case is aborted
* and considered failing if its run time exceeds @usec_timeout. * and considered failing if its run time exceeds @usec_timeout.
*
* The forking behavior can be configured with the following flags: * The forking behavior can be configured with the following flags:
* %G_TEST_TRAP_SILENCE_STDOUT - redirect stdout of the test child * <variablelist>
* to /dev/null so it cannot be observed on the console during test * <varlistentry>
* runs. The actual output is still captured though to allow later * <term>%G_TEST_TRAP_SILENCE_STDOUT</term>
* tests with g_test_trap_assert_stdout(). * <listitem><para>
* %G_TEST_TRAP_SILENCE_STDERR - redirect stderr of the test child * redirect stdout of the test child to <filename>/dev/null</filename>
* to /dev/null so it cannot be observed on the console during test * so it cannot be observed on the console during test runs.
* runs. The actual output is still captured though to allow later * The actual output is still captured though to allow later
* tests with g_test_trap_assert_stderr(). * tests with g_test_trap_assert_stdout().
* %G_TEST_TRAP_INHERIT_STDIN - if this flag is given, stdin of the * </para></listitem>
* forked child process is shared with stdin of its parent process. * </varlistentry>
* It is redirected to /dev/null otherwise. * <varlistentry>
* <term>%G_TEST_TRAP_SILENCE_STDERR</term>
* <listitem><para>
* redirect stderr of the test child to <filename>/dev/null</filename>
* so it cannot be observed on the console during test runs.
* The actual output is still captured though to allow later
* tests with g_test_trap_assert_stderr().
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>%G_TEST_TRAP_INHERIT_STDIN</term>
* <listitem><para>
* if this flag is given, stdin of the forked child process is
* shared with stdin of its parent process. It is redirected to
* <filename>/dev/null</filename> otherwise.
* </para></listitem>
* </varlistentry>
* </variablelist>
* *
* In the following example, the test code forks, the forked child * In the following example, the test code forks, the forked child
* process produces some sample output and exits successfully. * process produces some sample output and exits successfully.
* The forking parent process then asserts successfull child program * The forking parent process then asserts successful child program
* termination and validates child program outputs. * termination and validates child program outputs.
* *
* |[ * |[