Create a new TestCase, named test_name, this API is fairly low level, calling
g_test_add or add_func is preferable.
When this test is executed, a fixture structure of size data_size will be allocated and filled with 0s. Then
data_setup is called to initialize the fixture. After fixture setup, the actual test function data_test is called.
Once the test run completed, the fixture structure is torn down by calling data_teardown and after that the memory is
released.
Splitting up a test run into fixture setup, test function and fixture teardown is most usful if the same fixture is used for multiple
tests. In this cases, TestCase will be called with the same fixture, but varying test_name
and data_test arguments.
| test_name |
the name for the test case |
| data_setup |
the function to set up the fixture data |
| data_teardown |
the function to teardown the fixture data |
| data_size |
the size of the fixture data structure |
| data_test |
the actual test function |
| test_data |
test data argument for the test functions |
|
a newly allocated TestCase. |