mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gtestutils: Clarify docs about calling g_test_init() before anything
Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2943
This commit is contained in:
parent
7fec23ed5e
commit
045bc7adde
@ -89,11 +89,15 @@
|
||||
* The API is designed to handle creation and registration of test suites
|
||||
* and test cases implicitly. A simple call like
|
||||
* |[<!-- language="C" -->
|
||||
* g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
|
||||
*
|
||||
* g_test_add_func ("/misc/assertions", test_assertions);
|
||||
* ]|
|
||||
* creates a test suite called "misc" with a single test case named
|
||||
* "assertions", which consists of running the test_assertions function.
|
||||
*
|
||||
* g_test_init() should be called before calling any other test functions.
|
||||
*
|
||||
* In addition to the traditional g_assert_true(), the test framework provides
|
||||
* an extended set of assertions for comparisons: g_assert_cmpfloat(),
|
||||
* g_assert_cmpfloat_with_epsilon(), g_assert_cmpint(), g_assert_cmpuint(),
|
||||
@ -1684,6 +1688,8 @@ test_rm_isolate_dirs (void)
|
||||
* test random number generator, the name for g_get_prgname()
|
||||
* and parsing test related command line args.
|
||||
*
|
||||
* This should be called before calling any other `g_test_*()` functions.
|
||||
*
|
||||
* So far, the following arguments are understood:
|
||||
*
|
||||
* - `-l`: List test cases available in a test executable.
|
||||
|
Loading…
Reference in New Issue
Block a user