From 52e1e9304aa00cf3fba258bee734cb0ab27eeb06 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 12 Jun 2008 06:18:14 +0000 Subject: [PATCH] Documentation fixups svn path=/trunk/; revision=7024 --- ChangeLog | 4 ++ glib/gtestutils.c | 136 ++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 110 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b3d9b5b0..6bb19a050 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-06-12 Matthias Clasen + + * glib/gtestutils.c: Documentation fixups + 2008-06-11 Matthias Clasen * glib/glist.c: Tiny doc fix diff --git a/glib/gtestutils.c b/glib/gtestutils.c index 23c5ae3ed..cd7a2cd1e 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -372,23 +372,77 @@ parse_args (gint *argc_p, * test random number generator, the name for g_get_prgname() * and parsing test related command line args. * So far, the following arguments are understood: - * - * -l list test cases available in a test executable. - * --seed RANDOMSEED provide a random seed to reproduce test runs using random numbers. - * --verbose run tests verbosely. - * -q, --quiet run tests quietly. - * -p TESTPATH execute all tests matching TESTPATH. - * -m {perf|slow|thorough|quick} - * execute tests according to these test modes: - * perf - performance tests, may take long and report results. - * slow - slow and thorough tests, may take quite long and maximize coverage. - * thorough - currently an alias for "slow". - * quick - quick tests, should run really quickly and give good coverage. - * --debug-log debug test logging output. - * -k, --keep-going gtester specific argument. - * --GTestLogFD N gtester specific argument. - * --GTestSkipCount N gtester specific argument. - * + * + * + * + * + * list test cases available in a test executable. + * + * + * + * + * + * provide a random seed to reproduce test runs using random numbers. + * + * + * + * + * run tests verbosely. + * + * + * , + * run tests quietly. + * + * + * + * + * execute all tests matching TESTPATH. + * + * + * + * + * + * execute tests according to these test modes: + * + * + * perf + * + * performance tests, may take long and report results. + * + * + * + * slow, thorough + * + * slow and thorough tests, may take quite long and + * maximize coverage. + * + * + * + * quick + * + * quick tests, should run really quickly and give good coverage. + * + * + * + * + * + * + * + * debug test logging output. + * + * + * , + * gtester-specific argument. + * + * + * + * gtester-specific argument. + * + * + * + * gtester-specific argument. + * + * * * Since: 2.16 */ @@ -485,9 +539,11 @@ test_run_seed (const gchar *rseed) * g_test_rand_int: * * Get a reproducible random integer number. + * * The random numbers generated by the g_test_rand_*() family of functions * change with every new test program start, unless the --seed option is * given when starting test programs. + * * For individual test cases however, the random number generator is * reseeded, to avoid dependencies between tests and to make --seed * effective for all test cases. @@ -689,6 +745,7 @@ g_test_message (const char *format, * @uri_pattern: the base pattern for bug URIs * * Specify the base URI for bug reports. + * * The base URI is used to construct bug report messages for * g_test_message() when g_test_bug() is called. * 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. * The test suites to be executed are filtered according to - * test path arguments (-p ) as parsed by g_test_init(). + * test path arguments (-p testpath) + * as parsed by g_test_init(). * g_test_run_suite() or g_test_run() may only be called once * in a program. * @@ -1430,22 +1488,40 @@ test_time_stamp (void) * Fork the current test program to execute a test case that might * not return or that might abort. The forked test case is aborted * and considered failing if its run time exceeds @usec_timeout. + * * The forking behavior can be configured with the following flags: - * %G_TEST_TRAP_SILENCE_STDOUT - redirect stdout of the test child - * to /dev/null 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_stdout(). - * %G_TEST_TRAP_SILENCE_STDERR - redirect stderr of the test child - * to /dev/null 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(). - * %G_TEST_TRAP_INHERIT_STDIN - if this flag is given, stdin of the - * forked child process is shared with stdin of its parent process. - * It is redirected to /dev/null otherwise. + * + * + * %G_TEST_TRAP_SILENCE_STDOUT + * + * redirect stdout of the test child to /dev/null + * 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_stdout(). + * + * + * + * %G_TEST_TRAP_SILENCE_STDERR + * + * redirect stderr of the test child to /dev/null + * 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(). + * + * + * + * %G_TEST_TRAP_INHERIT_STDIN + * + * if this flag is given, stdin of the forked child process is + * shared with stdin of its parent process. It is redirected to + * /dev/null otherwise. + * + * + * * * In the following example, the test code forks, the forked child * 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. * * |[ -- 2.11.4.GIT