gplugin/gplugin

use g_assert_error and g_assert_no_error
feature/loader-registration-cleanup
2020-02-24, Gary Kramlich
f401cd3acc34
Parents 49b26135dff7
Children 17de6528736d
use g_assert_error and g_assert_no_error
--- a/gplugin/tests/test-loader-registration.c Mon Feb 24 04:09:46 2020 -0600
+++ b/gplugin/tests/test-loader-registration.c Mon Feb 24 22:15:36 2020 -0600
@@ -94,7 +94,7 @@
ret = gplugin_manager_register_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_true(ret);
- g_assert_null(error);
+ g_assert_no_error(error);
}
static void
@@ -107,11 +107,11 @@
ret = gplugin_manager_register_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_true(ret);
- g_assert_null(error);
+ g_assert_no_error(error);
ret = gplugin_manager_register_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_false(ret);
- g_assert_nonnull(error);
+ g_assert_error(error, GPLUGIN_DOMAIN, 0);
}
static void
@@ -125,12 +125,12 @@
ret = gplugin_manager_register_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_true(ret);
- g_assert_null(error);
+ g_assert_no_error(error);
ret = gplugin_manager_unregister_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_true(ret);
- g_assert_null(error);
+ g_assert_no_error(error);
}
static void
@@ -143,15 +143,15 @@
ret = gplugin_manager_register_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_true(ret);
- g_assert_null(error);
+ g_assert_no_error(error);
ret = gplugin_manager_unregister_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_true(ret);
- g_assert_null(error);
+ g_assert_no_error(error);
ret = gplugin_manager_unregister_loader(TEST_GPLUGIN_TYPE_LOADER, &error);
g_assert_false(ret);
- g_assert_nonnull(error);
+ g_assert_error(error, GPLUGIN_DOMAIN, 0);
}
/******************************************************************************