Commit 07278e73 authored by Philip Withnall's avatar Philip Withnall

gtestutils: Clarify the docs for g_test_create_case()

Improve formatting, and clarify that the same *type* of test fixture can
be reused, not the same specific instance of a test fixture.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>

Fixes: #250
parent a84f241d
......@@ -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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment