diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 9c45e5e4b..b087fe050 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -3638,6 +3638,7 @@ g_test_get_root g_test_suite_add g_test_suite_add_suite g_test_run_suite +g_test_case_free g_test_trap_assertions diff --git a/glib/gtestutils.c b/glib/gtestutils.c index 8ae746c73..ce53a8047 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -2994,6 +2994,21 @@ g_test_run_suite (GTestSuite *suite) return n_bad; } +/** + * g_test_case_free: + * @test_case: a #GTestCase + * + * Free the @test_case. + * + * Since: 2.70 + */ +void +g_test_case_free (GTestCase *test_case) +{ + g_free (test_case->name); + g_slice_free (GTestCase, test_case); +} + static void gtest_default_log_handler (const gchar *log_domain, GLogLevelFlags log_level, diff --git a/glib/gtestutils.h b/glib/gtestutils.h index 041143936..2376761d8 100644 --- a/glib/gtestutils.h +++ b/glib/gtestutils.h @@ -506,6 +506,9 @@ void g_test_suite_add_suite (GTestSuite *suite, GLIB_AVAILABLE_IN_ALL int g_test_run_suite (GTestSuite *suite); +GLIB_AVAILABLE_IN_2_70 +void g_test_case_free (GTestCase *test_case); + GLIB_AVAILABLE_IN_ALL void g_test_trap_assertions (const char *domain, const char *file,