Merge branch '250-testcase-docs' into 'master'

gtestutils: Clarify the docs for g_test_create_case()

Closes #250

See merge request GNOME/glib!1587
This commit is contained in:
Philip Withnall 2020-07-27 17:01:16 +00:00
commit 1203e80f5f

View File

@ -2089,8 +2089,11 @@ g_test_run (void)
* @data_test: (scope async): the actual test function
* @data_teardown: (scope async): the function to teardown the fixture data
*
* Create a new #GTestCase, named @test_name, this API is fairly
* low level, calling g_test_add() or g_test_add_func() is preferable.
* Create a new #GTestCase, named @test_name.
*
* This API is fairly low level, and calling g_test_add() or g_test_add_func()
* is preferable.
*
* When this test is executed, a fixture structure of size @data_size
* will be automatically allocated and filled with zeros. Then @data_setup is
* called to initialize the fixture. After fixture setup, the actual test
@ -2099,10 +2102,10 @@ g_test_run (void)
* after that the memory is automatically released by the test framework.
*
* Splitting up a test run into fixture setup, test function and
* fixture teardown is most useful if the same fixture is used for
* fixture teardown is most useful if the same fixture type is used for
* multiple tests. In this cases, g_test_create_case() will be
* called with the same fixture, but varying @test_name and
* @data_test arguments.
* called with the same type of fixture (the @data_size argument), but varying
* @test_name and @data_test arguments.
*
* Returns: a newly allocated #GTestCase.
*