gtestutils: add g_test_add_data_func_full()

Like g_test_add_data_func(), but includes a GDestroyNotify for the
test data.

https://bugzilla.gnome.org/show_bug.cgi?id=682560
This commit is contained in:
Dan Winship
2012-08-23 12:29:36 -04:00
parent 2427378223
commit 0c0cdfd9c4
4 changed files with 37 additions and 0 deletions

View File

@@ -108,6 +108,13 @@ void g_test_add_func (const char *testpath,
void g_test_add_data_func (const char *testpath,
gconstpointer test_data,
GTestDataFunc test_func);
GLIB_AVAILABLE_IN_2_34
void g_test_add_data_func_full (const char *testpath,
gpointer test_data,
GTestDataFunc test_func,
GDestroyNotify data_free_func);
/* tell about failure */
void g_test_fail (void);