[gnome-software/wip/async-plugin-repo-funcs: 30/30] lib: Skip repository related actions in gs_plugin_func() test
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/async-plugin-repo-funcs: 30/30] lib: Skip repository related actions in gs_plugin_func() test
- Date: Wed, 29 Jun 2022 10:20:15 +0000 (UTC)
commit 5f90cc2540a0c48fa0206a3ede3c24490c0ba9f1
Author: Milan Crha <mcrha redhat com>
Date: Tue Jun 14 21:31:32 2022 +0200
lib: Skip repository related actions in gs_plugin_func() test
These do not have function, they exist only for better error messages.
lib/gs-self-test.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-self-test.c b/lib/gs-self-test.c
index c98aca8aa..c38f452ea 100644
--- a/lib/gs-self-test.c
+++ b/lib/gs-self-test.c
@@ -219,8 +219,15 @@ gs_plugin_func (void)
}
for (guint i = 1; i < GS_PLUGIN_ACTION_LAST; i++) {
const gchar *tmp = gs_plugin_action_to_function_name (i);
- if (tmp == NULL)
+ if (tmp == NULL) {
+ /* These do not have function, they exist only for better error messages. */
+ if (i == GS_PLUGIN_ACTION_INSTALL_REPO ||
+ i == GS_PLUGIN_ACTION_REMOVE_REPO ||
+ i == GS_PLUGIN_ACTION_ENABLE_REPO ||
+ i == GS_PLUGIN_ACTION_DISABLE_REPO)
+ continue;
g_critical ("failed to convert %u", i);
+ }
}
/* add a couple of duplicate IDs */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]