Function Macro
GLibtest_add
since: 2.16
Declaration [src]
#define g_test_add (
testpath,
Fixture,
tdata,
fsetup,
ftest,
fteardown
)
Description [src]
Hooks up a new test case at testpath
.
This function is similar to g_test_add_func()
.
A fixture data structure with setup and teardown functions
may be provided, similar to g_test_create_case()
.
g_test_add()
is implemented as a macro, so that the fsetup
,
ftest
and fteardown
callbacks can expect a Fixture
pointer
as their first argument in a type safe manner. They otherwise
have type GTestFixtureFunc
.
Available since: 2.16
This function is not directly available to language bindings.
Parameters
testpath
-
Type:
-
The test path for a new test case.
Fixture
-
Type:
-
The type of a fixture data structure.
tdata
-
Type:
-
Data argument for the test functions.
fsetup
-
Type:
-
The function to set up the fixture data.
ftest
-
Type:
-
The actual test function.
fteardown
-
Type:
-
The function to tear down the fixture data.