gplugin/gplugin

merge the register and unregister loader tests into a single test
bugfix/valgrind-catchup
2020-03-12, Gary Kramlich
f85b91d2eff1
Parents cb926f728b2e
Children a7cb44804c3b
merge the register and unregister loader tests into a single test
--- a/gplugin/tests/test-loader-registration.c Mon Mar 09 23:19:03 2020 -0500
+++ b/gplugin/tests/test-loader-registration.c Thu Mar 12 23:17:54 2020 -0500
@@ -92,7 +92,7 @@
* Tests
*****************************************************************************/
static void
-test_gplugin_manager_loader_register(void)
+test_gplugin_manager_loader_register_unregister(void)
{
GError *error = NULL;
gboolean ret;
@@ -104,6 +104,11 @@
g_assert_true(ret);
g_assert_no_error(error);
+
+ ret = gplugin_manager_unregister_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
+
+ g_assert_true(ret);
+ g_assert_no_error(error);
}
static void
@@ -123,21 +128,6 @@
g_assert_false(ret);
g_assert_error(error, GPLUGIN_DOMAIN, 0);
g_clear_error(&error);
-}
-
-static void
-test_gplugin_manager_loader_unregister(void)
-{
- GError *error = NULL;
- gboolean ret;
-
- gplugin_manager_private_uninit();
- gplugin_manager_private_init();
-
- ret = gplugin_manager_register_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
-
- g_assert_true(ret);
- g_assert_no_error(error);
ret = gplugin_manager_unregister_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
@@ -181,15 +171,11 @@
gplugin_init();
g_test_add_func(
- "/manager/loader/register",
- test_gplugin_manager_loader_register);
+ "/manager/loader/register_unregister",
+ test_gplugin_manager_loader_register_unregister);
g_test_add_func(
"/manager/loader/register-twice",
test_gplugin_manager_loader_register_twice);
-
- g_test_add_func(
- "/manager/loader/unregister",
- test_gplugin_manager_loader_unregister);
g_test_add_func(
"/manager/loader/unregister-twice",
test_gplugin_manager_loader_unregister_twice);