# HG changeset patch
# Node ID e3c767c26734efa3907b949918ff3a3ec10de825
# Parent  a23c54665628803e4da9db4b6a5a79ad352c517a
diff --git a/gplugin/tests/dynamic-type/dynamic-type-user.c b/gplugin/tests/dynamic-type/dynamic-type-user.c
--- a/gplugin/tests/dynamic-type/dynamic-type-user.c
+++ b/gplugin/tests/dynamic-type/dynamic-type-user.c
@@ -26,7 +26,7 @@
 static GPluginPluginInfo *
 dynamic_user_query(G_GNUC_UNUSED GError **error)
 {
-	const gchar *const dependencies[] = {"gplugin/dynamic-type-provider", NULL};
+	const char *const dependencies[] = {"gplugin/dynamic-type-provider", NULL};
 
 	/* clang-format off */
 	return gplugin_plugin_info_new(
diff --git a/gplugin/tests/plugins/basic-plugin.c b/gplugin/tests/plugins/basic-plugin.c
--- a/gplugin/tests/plugins/basic-plugin.c
+++ b/gplugin/tests/plugins/basic-plugin.c
@@ -21,7 +21,7 @@
 static GPluginPluginInfo *
 basic_query(G_GNUC_UNUSED GError **error)
 {
-	const gchar *const authors[] = {"author1", NULL};
+	const char *const authors[] = {"author1", NULL};
 
 	/* clang-format off */
 	return gplugin_plugin_info_new(
diff --git a/gplugin/tests/test-auto-load.c b/gplugin/tests/test-auto-load.c
--- a/gplugin/tests/test-auto-load.c
+++ b/gplugin/tests/test-auto-load.c
@@ -92,14 +92,14 @@
 
 	g_assert_true(gplugin_plugin_info_get_auto_load(info));
 
-	g_clear_object(&info);
+	g_assert_finalize_object(info);
 }
 
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-bind-global.c b/gplugin/tests/test-bind-global.c
--- a/gplugin/tests/test-bind-global.c
+++ b/gplugin/tests/test-bind-global.c
@@ -15,8 +15,6 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
 #include <glib.h>
 
 #include <gplugin.h>
@@ -49,8 +47,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-core.c b/gplugin/tests/test-core.c
--- a/gplugin/tests/test-core.c
+++ b/gplugin/tests/test-core.c
@@ -23,16 +23,16 @@
  * Helpers
  *****************************************************************************/
 static void
-test_gplugin_count_ids_and_plugins(gint *n_ids, gint *n_plugins)
+test_gplugin_count_ids_and_plugins(int *n_ids, int *n_plugins)
 {
 	GPluginManager *manager = gplugin_manager_get_default();
 	GList *l_ids = NULL, *l_id = NULL;
-	gint ids = 0, plugins = 0;
+	int ids = 0, plugins = 0;
 
 	l_ids = gplugin_manager_list_plugins(manager);
 	for(l_id = l_ids; l_id; l_id = l_id->next) {
 		GSList *l_plugins = NULL, *l_plugin = NULL;
-		const gchar *id = (const gchar *)l_id->data;
+		const char *id = (const char *)l_id->data;
 
 		ids += 1;
 
@@ -102,7 +102,7 @@
 test_gplugin_init_uninit_with_double_refresh_plugins(void)
 {
 	GPluginManager *manager = NULL;
-	gint f_ids = 0, s_ids = 0, f_plugins = 0, s_plugins = 0;
+	int f_ids = 0, s_ids = 0, f_plugins = 0, s_plugins = 0;
 
 	gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
 
@@ -145,8 +145,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-dynamic-type.c b/gplugin/tests/test-dynamic-type.c
--- a/gplugin/tests/test-dynamic-type.c
+++ b/gplugin/tests/test-dynamic-type.c
@@ -15,8 +15,6 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
 #include <glib.h>
 
 #include <gplugin.h>
@@ -78,10 +76,9 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
-
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
 	gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
diff --git a/gplugin/tests/test-find-plugins.c b/gplugin/tests/test-find-plugins.c
--- a/gplugin/tests/test-find-plugins.c
+++ b/gplugin/tests/test-find-plugins.c
@@ -24,7 +24,7 @@
  *****************************************************************************/
 static void
 test_gplugin_manager_foreach_load_plugins(
-	G_GNUC_UNUSED const gchar *id,
+	G_GNUC_UNUSED const char *id,
 	GSList *plugins,
 	G_GNUC_UNUSED gpointer data)
 {
@@ -38,7 +38,7 @@
 
 static void
 test_gplugin_manager_foreach_unload_plugins(
-	G_GNUC_UNUSED const gchar *id,
+	G_GNUC_UNUSED const char *id,
 	GSList *plugins,
 	G_GNUC_UNUSED gpointer data)
 {
@@ -79,11 +79,11 @@
 	 * load-failed: load failed
 	 * unload-failed: unload failed
 	 */
-	gint QUERIED = 7;
-	gint LOADED = 3;
-	gint LOAD_FAILED = 2;
-	gint UNLOADED = 3; /* unloaded plugins go back to the queried state */
-	gint UNLOAD_FAILED = 2;
+	int QUERIED = 7;
+	int LOADED = 3;
+	int LOAD_FAILED = 2;
+	int UNLOADED = 3; /* unloaded plugins go back to the queried state */
+	int UNLOAD_FAILED = 2;
 
 	gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
 
@@ -145,8 +145,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-id-collision.c b/gplugin/tests/test-id-collision.c
--- a/gplugin/tests/test-id-collision.c
+++ b/gplugin/tests/test-id-collision.c
@@ -15,8 +15,6 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
 #include <glib.h>
 
 #include <gplugin.h>
@@ -48,8 +46,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-id-normalize.c b/gplugin/tests/test-id-normalize.c
--- a/gplugin/tests/test-id-normalize.c
+++ b/gplugin/tests/test-id-normalize.c
@@ -23,10 +23,10 @@
  * Tests
  *****************************************************************************/
 static void
-test_id_normalize(const gchar *input, const gchar *expected)
+test_id_normalize(const char *input, const char *expected)
 {
 	GPluginPluginInfo *info = NULL;
-	gchar *normalized = NULL;
+	char *normalized = NULL;
 
 	info = gplugin_plugin_info_new(input, 0, NULL);
 	normalized = gplugin_plugin_info_get_id_normalized(info);
@@ -92,8 +92,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-loader-registration.c b/gplugin/tests/test-loader-registration.c
--- a/gplugin/tests/test-loader-registration.c
+++ b/gplugin/tests/test-loader-registration.c
@@ -43,7 +43,7 @@
 static GPluginPlugin *
 test_gplugin_loader_query(
 	G_GNUC_UNUSED GPluginLoader *loader,
-	G_GNUC_UNUSED const gchar *filename,
+	G_GNUC_UNUSED const char *filename,
 	G_GNUC_UNUSED GError **error)
 {
 	return NULL;
@@ -91,10 +91,10 @@
 test_gplugin_loader_new(void)
 {
 	/* clang-format off */
-	return GPLUGIN_LOADER(g_object_new(
+	return g_object_new(
 		TEST_GPLUGIN_TYPE_LOADER,
 		"id", "test-loader",
-		NULL));
+		NULL);
 	/* clang-format on */
 }
 
@@ -248,10 +248,10 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
-	gint r = 0;
+	int r = 0;
 
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-loader.c b/gplugin/tests/test-loader.c
--- a/gplugin/tests/test-loader.c
+++ b/gplugin/tests/test-loader.c
@@ -44,7 +44,7 @@
 	GObject parent;
 
 	/* overrides */
-	gchar *filename;
+	char *filename;
 	GPluginLoader *loader;
 	GPluginPluginInfo *info;
 	GPluginPluginState state;
@@ -72,27 +72,27 @@
 {
 	TestGPluginPlugin *plugin = TEST_GPLUGIN_PLUGIN(obj);
 	switch(param_id) {
-		case PROP_FILENAME:
-			g_value_set_string(value, plugin->filename);
-			break;
-		case PROP_LOADER:
-			g_value_set_object(value, plugin->loader);
-			break;
-		case PROP_INFO:
-			g_value_set_object(value, plugin->info);
-			break;
-		case PROP_STATE:
-			g_value_set_enum(value, plugin->state);
-			break;
-		case PROP_DESIRED_STATE:
-			g_value_set_enum(value, plugin->desired_state);
-			break;
-		case PROP_ERROR:
-			g_value_set_boxed(value, plugin->error);
-			break;
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-			break;
+	case PROP_FILENAME:
+		g_value_set_string(value, plugin->filename);
+		break;
+	case PROP_LOADER:
+		g_value_set_object(value, plugin->loader);
+		break;
+	case PROP_INFO:
+		g_value_set_object(value, plugin->info);
+		break;
+	case PROP_STATE:
+		g_value_set_enum(value, plugin->state);
+		break;
+	case PROP_DESIRED_STATE:
+		g_value_set_enum(value, plugin->desired_state);
+		break;
+	case PROP_ERROR:
+		g_value_set_boxed(value, plugin->error);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
+		break;
 	}
 }
 
@@ -106,27 +106,27 @@
 	TestGPluginPlugin *plugin = TEST_GPLUGIN_PLUGIN(obj);
 
 	switch(param_id) {
-		case PROP_FILENAME:
-			plugin->filename = g_strdup(g_value_get_string(value));
-			break;
-		case PROP_LOADER:
-			plugin->loader = g_value_dup_object(value);
-			break;
-		case PROP_INFO:
-			plugin->info = g_value_dup_object(value);
-			break;
-		case PROP_STATE:
-			plugin->state = g_value_get_enum(value);
-			break;
-		case PROP_DESIRED_STATE:
-			plugin->desired_state = g_value_get_enum(value);
-			break;
-		case PROP_ERROR:
-			plugin->error = g_value_dup_boxed(value);
-			break;
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-			break;
+	case PROP_FILENAME:
+		plugin->filename = g_value_dup_string(value);
+		break;
+	case PROP_LOADER:
+		plugin->loader = g_value_dup_object(value);
+		break;
+	case PROP_INFO:
+		plugin->info = g_value_dup_object(value);
+		break;
+	case PROP_STATE:
+		plugin->state = g_value_get_enum(value);
+		break;
+	case PROP_DESIRED_STATE:
+		plugin->desired_state = g_value_get_enum(value);
+		break;
+	case PROP_ERROR:
+		plugin->error = g_value_dup_boxed(value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
+		break;
 	}
 }
 
@@ -201,14 +201,14 @@
 static GPluginPlugin *
 test_gplugin_loader_query(
 	GPluginLoader *l,
-	G_GNUC_UNUSED const gchar *filename,
+	G_GNUC_UNUSED const char *filename,
 	G_GNUC_UNUSED GError **error)
 {
 	TestGPluginLoader *loader = TEST_GPLUGIN_LOADER(l);
 
 	loader->query = TRUE;
 
-	return GPLUGIN_PLUGIN(g_object_new(TEST_GPLUGIN_TYPE_PLUGIN, NULL));
+	return g_object_new(TEST_GPLUGIN_TYPE_PLUGIN, NULL);
 }
 
 static gboolean
@@ -261,10 +261,10 @@
 test_gplugin_loader_new(void)
 {
 	/* clang-format off */
-	return GPLUGIN_LOADER(g_object_new(
+	return g_object_new(
 		TEST_GPLUGIN_TYPE_LOADER,
 		"id", "test-loader",
-		NULL));
+		NULL);
 	/* clang-format on */
 }
 /******************************************************************************
@@ -274,15 +274,14 @@
 test_gplugin_loader_properties(void)
 {
 	GPluginLoader *loader = test_gplugin_loader_new();
-	gchar *id = NULL;
-
-	g_assert_cmpstr("test-loader", ==, gplugin_loader_get_id(loader));
+	char *id = NULL;
 
 	g_object_get(loader, "id", &id, NULL);
-	g_assert_cmpstr("test-loader", ==, id);
+
+	g_assert_cmpstr(id, ==, "test-loader");
 	g_clear_pointer(&id, g_free);
 
-	g_clear_object(&loader);
+	g_assert_finalize_object(loader);
 }
 
 static void
@@ -327,8 +326,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-native-loader.c b/gplugin/tests/test-native-loader.c
--- a/gplugin/tests/test-native-loader.c
+++ b/gplugin/tests/test-native-loader.c
@@ -15,8 +15,6 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
 #include <glib.h>
 
 #include <gplugin.h>
@@ -83,10 +81,9 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
-
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
 	gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
diff --git a/gplugin/tests/test-newest-version.c b/gplugin/tests/test-newest-version.c
--- a/gplugin/tests/test-newest-version.c
+++ b/gplugin/tests/test-newest-version.c
@@ -23,7 +23,7 @@
  * Helpers
  *****************************************************************************/
 static void
-test_newest_version(const gchar *id, const gchar *version)
+test_newest_version(const char *id, const char *version)
 {
 	GPluginManager *manager = gplugin_manager_get_default();
 	GPluginPlugin *plugin = NULL;
@@ -90,8 +90,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
diff --git a/gplugin/tests/test-option-group.c b/gplugin/tests/test-option-group.c
--- a/gplugin/tests/test-option-group.c
+++ b/gplugin/tests/test-option-group.c
@@ -23,14 +23,14 @@
  * Tests
  *****************************************************************************/
 static void
-test_gplugin_option_group_paths(const gchar *args, GList *expected)
+test_gplugin_option_group_paths(const char *args, GList *expected)
 {
 	GPluginManager *manager = NULL;
 	GError *error = NULL;
 	GOptionContext *ctx = NULL;
 	GOptionGroup *group = NULL;
 	GList *paths = NULL, *l1 = NULL, *l2 = NULL;
-	gchar **argv = NULL;
+	char **argv = NULL;
 
 	argv = g_strsplit(args, ",", 0);
 
@@ -52,7 +52,7 @@
 	paths = gplugin_manager_get_paths(manager);
 	paths = g_list_sort(paths, g_str_equal);
 
-	expected = g_list_sort(expected, g_str_equal); //-V522
+	expected = g_list_sort(expected, g_str_equal);
 
 	g_assert_cmpuint(g_list_length(paths), ==, g_list_length(expected));
 
@@ -75,7 +75,7 @@
 test_gplugin_manager_default_paths(void)
 {
 	GList *paths = NULL;
-	gchar *path = NULL;
+	char *path = NULL;
 
 	path = g_build_filename(PREFIX, LIBDIR, "gplugin", G_DIR_SEPARATOR_S, NULL);
 	paths = g_list_prepend(paths, path);
@@ -94,7 +94,7 @@
 test_gplugin_option_group_default_paths(void)
 {
 	GList *expected = NULL;
-	gchar *args = "test-option-group";
+	char *args = "test-option-group";
 
 	expected = test_gplugin_manager_default_paths();
 
@@ -105,7 +105,7 @@
 test_gplugin_option_group_default_paths_with_single(void)
 {
 	GList *expected = NULL;
-	gchar *args = "test-option-group,-p,foo";
+	char *args = "test-option-group,-p,foo";
 
 	expected = test_gplugin_manager_default_paths();
 	expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S));
@@ -117,7 +117,7 @@
 test_gplugin_option_group_default_paths_with_multiple(void)
 {
 	GList *expected = NULL;
-	gchar *args = "test-option-group,-p,foo,-p,bar,-p,baz";
+	char *args = "test-option-group,-p,foo,-p,bar,-p,baz";
 
 	expected = test_gplugin_manager_default_paths();
 	expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S));
@@ -130,7 +130,7 @@
 static void
 test_gplugin_option_group_no_default_paths_short(void)
 {
-	gchar *args = "test-option-group,-D";
+	char *args = "test-option-group,-D";
 
 	test_gplugin_option_group_paths(args, NULL);
 }
@@ -138,7 +138,7 @@
 static void
 test_gplugin_option_group_no_default_paths_long(void)
 {
-	gchar *args = "test-option-group,--no-default-paths";
+	char *args = "test-option-group,--no-default-paths";
 
 	test_gplugin_option_group_paths(args, NULL);
 }
@@ -147,7 +147,7 @@
 test_gplugin_option_group_no_default_paths_with_single(void)
 {
 	GList *expected = NULL;
-	gchar *args = "test-option-group,-D,-p,foo";
+	char *args = "test-option-group,-D,-p,foo";
 
 	expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S));
 
@@ -158,7 +158,7 @@
 test_gplugin_option_group_no_default_paths_with_multiple(void)
 {
 	GList *expected = NULL;
-	gchar *args = "test-option-group,-D,-p,foo,-p,bar,-p,baz";
+	char *args = "test-option-group,-D,-p,foo,-p,bar,-p,baz";
 
 	expected = g_list_prepend(expected, g_strdup("foo" G_DIR_SEPARATOR_S));
 	expected = g_list_prepend(expected, g_strdup("bar" G_DIR_SEPARATOR_S));
@@ -171,7 +171,7 @@
 test_gplugin_option_group_add_path_short(void)
 {
 	GList *expected = g_list_prepend(NULL, g_strdup("foo" G_DIR_SEPARATOR_S));
-	gchar *args = "test-option-group,-D,-p,foo";
+	char *args = "test-option-group,-D,-p,foo";
 
 	test_gplugin_option_group_paths(args, expected);
 }
@@ -180,7 +180,7 @@
 test_gplugin_option_group_add_path_long(void)
 {
 	GList *expected = g_list_prepend(NULL, g_strdup("foo" G_DIR_SEPARATOR_S));
-	gchar *args = "test-option-group,-D,--path,foo";
+	char *args = "test-option-group,-D,--path,foo";
 
 	test_gplugin_option_group_paths(args, expected);
 }
@@ -188,8 +188,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-plugin-info.c b/gplugin/tests/test-plugin-info.c
--- a/gplugin/tests/test-plugin-info.c
+++ b/gplugin/tests/test-plugin-info.c
@@ -20,119 +20,56 @@
 #include <gplugin.h>
 #include <gplugin-native.h>
 
-#define test_string(var, value) \
-	G_STMT_START \
-		{ \
-			g_assert_cmpstr((var), ==, (value)); \
-			g_assert_cmpstr((var), ==, gplugin_plugin_info_get_##var(info)); \
-			g_free((var)); \
-		} \
-	G_STMT_END
-
-#define test_int(var, value) \
-	G_STMT_START \
-		{ \
-			g_assert_cmpint((var), ==, (value)); \
-			g_assert_cmpint((var), ==, gplugin_plugin_info_get_##var(info)); \
-		} \
-	G_STMT_END
-
-#define test_uint(var, value) \
-	G_STMT_START \
-		{ \
-			g_assert_cmpuint((var), ==, (value)); \
-			g_assert_cmpuint((var), ==, gplugin_plugin_info_get_##var(info)); \
-		} \
-	G_STMT_END
-
-#define test_true(var) \
-	G_STMT_START \
-		{ \
-			g_assert_true((var)); \
-			g_assert_true(gplugin_plugin_info_get_##var(info)); \
-		} \
-	G_STMT_END
-
-#define test_false(var) \
-	G_STMT_START \
-		{ \
-			g_assert_false((var)); \
-			g_assert_false(gplugin_plugin_info_get_##var(info)); \
-		} \
-	G_STMT_END
-
-typedef gchar **(*TestStringVFunc)(GPluginPluginInfo *info);
-
-static void
-test_stringv(
-	gchar **got,
-	const gchar *const *const expected,
-	TestStringVFunc func,
-	GPluginPluginInfo *info)
-{
-	gint i = 0;
-	gchar **tmp = NULL;
-
-	/* make sure our arrarys are the same length */
-	g_assert_cmpuint(g_strv_length(got), ==, g_strv_length((gchar **)expected));
-
-	/* now walk through until expected[i] is null comparing each entry */
-	for(i = 0; expected[i]; i++)
-		g_assert_cmpstr(got[i], ==, expected[i]);
-
-	/* call the accessor on the GPluginPluginInfo object */
-	tmp = func(info);
-
-	/* verify that the accessor returned the proper value as well */
-	g_assert_cmpuint(g_strv_length(tmp), ==, g_strv_length((gchar **)expected));
-
-	for(i = 0; expected[i]; i++)
-		g_assert_cmpstr(tmp[i], ==, expected[i]);
-
-	g_strfreev(got);
-}
-
 /******************************************************************************
  * Tests
  *****************************************************************************/
 static void
-test_gplugin_plugin_info_construction(void)
+test_gplugin_plugin_info_new_full(void)
 {
 	GPluginPluginInfo *info = NULL;
-	gchar *id = NULL, *name = NULL, *version = NULL, *icon_name = NULL;
-	gchar *license_id = NULL, *license_text = NULL, *license_url = NULL;
-	gchar *summary = NULL, *description = NULL, *category = NULL;
-	gchar *website = NULL;
+	GStrv authors = NULL;
+	GStrv dependencies = NULL;
+	GStrv provides = NULL;
+	char *category = NULL;
+	char *description = NULL;
 	char *discriminator = NULL;
-	gchar **provides = NULL, **authors = NULL, **dependencies = NULL;
-	gint priority = 0;
+	char *icon_name = NULL;
+	char *id = NULL;
+	char *license_id = NULL;
+	char *license_text = NULL;
+	char *license_url = NULL;
+	char *name = NULL;
+	char *summary = NULL;
+	char *version = NULL;
+	char *website = NULL;
+	int priority = 0;
 	guint abi_version = 0;
-	gboolean internal = FALSE, auto_load = FALSE;
-	const gchar *const r_provides[] = {"foo", NULL};
-	const gchar *const r_authors[] = {"author", NULL};
-	const gchar *const r_dependencies[] = {"dependency", NULL};
+	gboolean internal = FALSE;
+	gboolean auto_load = FALSE;
+	const char *const r_provides[] = {"foo", NULL};
+	const char *const r_authors[] = {"author", NULL};
+	const char *const r_dependencies[] = {"dependency", NULL};
 
 	/* clang-format off */
-	info = g_object_new(
-		GPLUGIN_TYPE_PLUGIN_INFO,
-		"id", "gplugin-test/plugin-info-test",
-		"provides", r_provides,
-		"priority", 1000,
-		"abi_version", GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
+	info = gplugin_plugin_info_new(
+		"gplugin-test/plugin-info-test",
+		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
+		"authors", r_authors,
+		"auto-load", TRUE,
+		"category", "category",
+		"dependencies", r_dependencies,
+		"description", "description",
+		"icon-name", "icon-name",
 		"internal", TRUE,
-		"auto-load", TRUE,
-		"name", "name",
-		"version", "version",
 		"license-id", "license-id",
 		"license-text", "license-text",
 		"license-url", "license-url",
-		"icon-name", "icon-name",
+		"name", "name",
+		"priority", 1000,
+		"provides", r_provides,
 		"summary", "summary",
-		"description", "description",
-		"category", "category",
-		"authors", r_authors,
+		"version", "version",
 		"website", "website",
-		"dependencies", r_dependencies,
 		NULL);
 	/* clang-format on */
 
@@ -141,29 +78,43 @@
 	/* clang-format off */
 	g_object_get(
 		info,
-		"id", &id,
+		"abi_version", &abi_version,
+		"authors", &authors,
+		"auto-load", &auto_load,
+		"category", &category,
+		"dependencies", &dependencies,
+		"description", &description,
 		"discriminator", &discriminator,
-		"provides", &provides,
-		"priority", &priority,
-		"abi_version", &abi_version,
+		"icon-name", &icon_name,
+		"id", &id,
 		"internal", &internal,
-		"auto-load", &auto_load,
-		"name", &name,
-		"version", &version,
 		"license-id", &license_id,
 		"license-text", &license_text,
 		"license-url", &license_url,
-		"icon-name", &icon_name,
+		"name", &name,
+		"priority", &priority,
+		"provides", &provides,
 		"summary", &summary,
-		"description", &description,
-		"category", &category,
-		"authors", &authors,
+		"version", &version,
 		"website", &website,
-		"dependencies", &dependencies,
 		NULL);
 	/* clang-format on */
 
-	test_string(id, "gplugin-test/plugin-info-test");
+	g_assert_cmpuint(abi_version, ==, GPLUGIN_NATIVE_PLUGIN_ABI_VERSION);
+
+	g_assert_cmpstrv(authors, r_authors);
+	g_clear_pointer(&authors, g_strfreev);
+
+	g_assert_true(auto_load);
+
+	g_assert_cmpstr(category, ==, "category");
+	g_clear_pointer(&category, g_free);
+
+	g_assert_cmpstrv(dependencies, r_dependencies);
+	g_clear_pointer(&dependencies, g_strfreev);
+
+	g_assert_cmpstr(description, ==, "description");
+	g_clear_pointer(&description, g_free);
 
 	/* We can't guarantee the value of the discriminator, so we just check that
 	 * it is not a NULL or an empty string.
@@ -172,44 +123,48 @@
 	g_assert_cmpstr(discriminator, !=, "");
 	g_clear_pointer(&discriminator, g_free);
 
-	test_stringv(
-		provides,
-		r_provides,
-		(TestStringVFunc)gplugin_plugin_info_get_provides,
-		info);
-	test_int(priority, 1000);
-	test_uint(abi_version, GPLUGIN_NATIVE_PLUGIN_ABI_VERSION);
-	test_true(internal);
-	test_true(auto_load);
-	test_string(name, "name");
-	test_string(version, "version");
-	test_string(license_id, "license-id");
-	test_string(license_text, "license-text");
-	test_string(license_url, "license-url");
-	test_string(icon_name, "icon-name");
-	test_string(summary, "summary");
-	test_string(description, "description");
-	test_string(category, "category");
-	test_stringv(
-		authors,
-		r_authors,
-		(TestStringVFunc)gplugin_plugin_info_get_authors,
-		info);
-	test_string(website, "website");
-	test_stringv(
-		dependencies,
-		r_dependencies,
-		(TestStringVFunc)gplugin_plugin_info_get_dependencies,
-		info);
+	g_assert_cmpstr(icon_name, ==, "icon-name");
+	g_clear_pointer(&icon_name, g_free);
+
+	g_assert_cmpstr(id, ==, "gplugin-test/plugin-info-test");
+	g_clear_pointer(&id, g_free);
+
+	g_assert_true(internal);
+
+	g_assert_cmpstr(license_id, ==, "license-id");
+	g_clear_pointer(&license_id, g_free);
+
+	g_assert_cmpstr(license_text, ==, "license-text");
+	g_clear_pointer(&license_text, g_free);
+
+	g_assert_cmpstr(license_url, ==, "license-url");
+	g_clear_pointer(&license_url, g_free);
 
-	g_object_unref(info);
+	g_assert_cmpstr(name, ==, "name");
+	g_clear_pointer(&name, g_free);
+
+	g_assert_cmpint(priority, ==, 1000);
+
+	g_assert_cmpstrv(provides, r_provides);
+	g_clear_pointer(&provides, g_strfreev);
+
+	g_assert_cmpstr(summary, ==, "summary");
+	g_clear_pointer(&summary, g_free);
+
+	g_assert_cmpstr(website, ==, "website");
+	g_clear_pointer(&website, g_free);
+
+	g_assert_cmpstr(version, ==, "version");
+	g_clear_pointer(&version, g_free);
+
+	g_assert_finalize_object(info);
 }
 
 static void
 test_gplugin_plugin_info_new_empty(void)
 {
 	GPluginPluginInfo *info = NULL;
-	gchar *id = NULL;
+	char *id = NULL;
 	guint32 abi_version = 0;
 
 	info = gplugin_plugin_info_new("empty", 1, NULL);
@@ -224,106 +179,42 @@
 		NULL);
 	/* clang-format on */
 
-	test_string(id, "empty");
-	test_uint(abi_version, 1);
-
-	g_object_unref(info);
-}
-
-static void
-test_gplugin_plugin_info_new_full(void)
-{
-	GPluginPluginInfo *info = NULL;
-	gchar *id = NULL, *name = NULL, *version = NULL, *icon_name = NULL;
-	gchar *license_id = NULL, *license_text = NULL, *license_url = NULL;
-	gchar *summary = NULL, *description = NULL, *category = NULL;
-	gchar *website = NULL;
-	gchar **authors = NULL, **dependencies = NULL;
-	guint abi_version = 0;
-	gboolean internal = FALSE, auto_load = FALSE;
-	const gchar *const r_authors[] = {"author", NULL};
-	const gchar *const r_dependencies[] = {"dependency", NULL};
-
-	/* clang-format off */
-	info = gplugin_plugin_info_new(
-		"gplugin-test/plugin-info-test",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		"internal", TRUE,
-		"auto-load", TRUE,
-		"name", "name",
-		"version", "version",
-		"license-id", "license-id",
-		"license-text", "license-text",
-		"license-url", "license-url",
-		"icon-name", "icon-name",
-		"summary", "summary",
-		"description", "description",
-		"category", "category",
-		"authors", r_authors,
-		"website", "website",
-		"dependencies", r_dependencies,
-		NULL);
-	/* clang-format on */
-
-	g_assert_true(GPLUGIN_IS_PLUGIN_INFO(info));
+	g_assert_cmpstr(id, ==, "empty");
+	g_clear_pointer(&id, g_free);
 
-	/* clang-format off */
-	g_object_get(
-		info,
-		"id", &id,
-		"abi_version", &abi_version,
-		"internal", &internal,
-		"auto-load", &auto_load,
-		"name", &name,
-		"version", &version,
-		"license-id", &license_id,
-		"license-text", &license_text,
-		"license-url", &license_url,
-		"icon-name", &icon_name,
-		"summary", &summary,
-		"description", &description,
-		"category", &category,
-		"authors", &authors,
-		"website", &website,
-		"dependencies", &dependencies,
-		NULL);
-	/* clang-format on */
+	g_assert_cmpuint(abi_version, ==, 1);
 
-	test_string(id, "gplugin-test/plugin-info-test");
-	test_uint(abi_version, GPLUGIN_NATIVE_PLUGIN_ABI_VERSION);
-	test_true(internal);
-	test_true(auto_load);
-	test_string(name, "name");
-	test_string(version, "version");
-	test_string(license_id, "license-id");
-	test_string(license_text, "license-text");
-	test_string(license_url, "license-url");
-	test_string(icon_name, "icon-name");
-	test_string(summary, "summary");
-	test_string(description, "description");
-	test_string(category, "category");
-	test_stringv(
-		authors,
-		r_authors,
-		(TestStringVFunc)gplugin_plugin_info_get_authors,
-		info);
-	test_string(website, "website");
-	test_stringv(
-		dependencies,
-		r_dependencies,
-		(TestStringVFunc)gplugin_plugin_info_get_dependencies,
-		info);
-
-	g_object_unref(info);
+	g_assert_finalize_object(info);
 }
 
 static void
 test_gplugin_plugin_info_authors_single(void)
 {
 	GPluginPluginInfo *info = NULL;
-	const gchar *const authors[] = {"author", NULL};
-	const gchar *const *g_authors = NULL;
-	gint i;
+	const char *const authors[] = {"author", NULL};
+	const char *const *g_authors = NULL;
+
+	/* clang-format off */
+	info = gplugin_plugin_info_new(
+		"test/single-author",
+		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
+		"authors", authors,
+		NULL);
+	/* clang-format on */
+
+	g_authors = gplugin_plugin_info_get_authors(info);
+
+	g_assert_cmpstrv(g_authors, authors);
+
+	g_assert_finalize_object(info);
+}
+
+static void
+test_gplugin_plugin_info_authors_multiple(void)
+{
+	GPluginPluginInfo *info = NULL;
+	const char *const authors[] = {"author1", "author2", NULL};
+	const char *const *g_authors = NULL;
 
 	/* clang-format off */
 	info = gplugin_plugin_info_new(
@@ -335,43 +226,17 @@
 
 	g_authors = gplugin_plugin_info_get_authors(info);
 
-	for(i = 0; authors[i]; i++)
-		g_assert_cmpstr(authors[i], ==, g_authors[i]);
-
-	g_object_unref(info);
-}
-
-static void
-test_gplugin_plugin_info_authors_multiple(void)
-{
-	GPluginPluginInfo *info = NULL;
-	const gchar *const authors[] = {"author1", "author2", NULL};
-	const gchar *const *g_authors = NULL;
-	gint i;
+	g_assert_cmpstrv(g_authors, authors);
 
-	/* clang-format off */
-	info = gplugin_plugin_info_new(
-		"test/single-author",
-		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
-		"authors", authors,
-		NULL);
-	/* clang-format on */
-
-	g_authors = gplugin_plugin_info_get_authors(info);
-
-	for(i = 0; authors[i]; i++)
-		g_assert_cmpstr(authors[i], ==, g_authors[i]);
-
-	g_object_unref(info);
+	g_assert_finalize_object(info);
 }
 
 static void
 test_gplugin_plugin_info_dependencies_single(void)
 {
 	GPluginPluginInfo *info = NULL;
-	gchar *dependencies[] = {"dependency1", NULL};
-	const gchar *const *g_dependencies = NULL;
-	gint i;
+	char *dependencies[] = {"dependency1", NULL};
+	const char *const *g_dependencies = NULL;
 
 	/* clang-format off */
 	info = gplugin_plugin_info_new(
@@ -383,23 +248,21 @@
 
 	g_dependencies = gplugin_plugin_info_get_dependencies(info);
 
-	for(i = 0; dependencies[i]; i++)
-		g_assert_cmpstr(dependencies[i], ==, g_dependencies[i]);
+	g_assert_cmpstrv(g_dependencies, dependencies);
 
-	g_object_unref(info);
+	g_assert_finalize_object(info);
 }
 
 static void
 test_gplugin_plugin_info_dependencies_multiple(void)
 {
 	GPluginPluginInfo *info = NULL;
-	gchar *dependencies[] = {"dependencie1", "dependencie2", NULL};
-	const gchar *const *g_dependencies = NULL;
-	gint i;
+	char *dependencies[] = {"dependency1", "dependency2", NULL};
+	const char *const *g_dependencies = NULL;
 
 	/* clang-format off */
 	info = gplugin_plugin_info_new(
-		"test/single-dependencie",
+		"test/single-dependency",
 		GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
 		"dependencies", dependencies,
 		NULL);
@@ -407,30 +270,23 @@
 
 	g_dependencies = gplugin_plugin_info_get_dependencies(info);
 
-	for(i = 0; dependencies[i]; i++)
-		g_assert_cmpstr(dependencies[i], ==, g_dependencies[i]);
+	g_assert_cmpstrv(g_dependencies, dependencies);
 
-	g_object_unref(info);
+	g_assert_finalize_object(info);
 }
 
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
-	gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
-
-	g_test_add_func(
-		"/plugin-info/construction",
-		test_gplugin_plugin_info_construction);
-
+	g_test_add_func("/plugin-info/new/full", test_gplugin_plugin_info_new_full);
 	g_test_add_func(
 		"/plugin-info/new/empty",
 		test_gplugin_plugin_info_new_empty);
-	g_test_add_func("/plugin-info/new/full", test_gplugin_plugin_info_new_full);
 
 	g_test_add_func(
 		"/plugin-info/authors/single",
diff --git a/gplugin/tests/test-plugin-manager-paths.c b/gplugin/tests/test-plugin-manager-paths.c
--- a/gplugin/tests/test-plugin-manager-paths.c
+++ b/gplugin/tests/test-plugin-manager-paths.c
@@ -154,7 +154,7 @@
 	GPluginManager *manager = gplugin_manager_get_default();
 	GHashTable *req = NULL;
 	GList *paths = NULL, *l = NULL;
-	gchar *path = NULL;
+	char *path = NULL;
 	guint size = 0;
 
 	/* build our table of required paths */
@@ -193,9 +193,9 @@
 	GPluginManager *manager = gplugin_manager_get_default();
 	GHashTable *req = NULL;
 	GList *paths = NULL, *l = NULL;
-	const gchar *prefix = "/usr/local/";
-	const gchar *appname = "foo";
-	gchar *path = NULL;
+	const char *prefix = "/usr/local/";
+	const char *appname = "foo";
+	char *path = NULL;
 	guint size = 0;
 
 	/* build our table of required paths */
@@ -237,12 +237,12 @@
 test_gplugin_manager_add_app_paths_via_environ(void)
 {
 	GList *paths = NULL, *l = NULL;
-	gint path_pos = 0;
-	gchar *pre_paths, *post_paths;
-	gint found_paths = 0;
-	gint path_count;
-	const gchar *pre_env_var_name = "GPLUGIN_EXTRA_TEST_PREPATHS";
-	const gchar *post_env_var_name = "GPLUGIN_EXTRA_TEST_POSTPATHS";
+	int path_pos = 0;
+	char *pre_paths, *post_paths;
+	int found_paths = 0;
+	int path_count;
+	const char *pre_env_var_name = "GPLUGIN_EXTRA_TEST_PREPATHS";
+	const char *post_env_var_name = "GPLUGIN_EXTRA_TEST_POSTPATHS";
 
 	GPluginManager *manager = gplugin_manager_get_default();
 
@@ -306,8 +306,8 @@
 	g_free(post_paths);
 }
 
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
diff --git a/gplugin/tests/test-signals.c b/gplugin/tests/test-signals.c
--- a/gplugin/tests/test-signals.c
+++ b/gplugin/tests/test-signals.c
@@ -406,8 +406,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-source.c b/gplugin/tests/test-source.c
--- a/gplugin/tests/test-source.c
+++ b/gplugin/tests/test-source.c
@@ -102,8 +102,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-unresolved-symbol.c b/gplugin/tests/test-unresolved-symbol.c
--- a/gplugin/tests/test-unresolved-symbol.c
+++ b/gplugin/tests/test-unresolved-symbol.c
@@ -15,8 +15,6 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
 #include <glib.h>
 
 #include <gplugin.h>
@@ -46,10 +44,9 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
-
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
 	gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
diff --git a/gplugin/tests/test-version-compare.c b/gplugin/tests/test-version-compare.c
--- a/gplugin/tests/test-version-compare.c
+++ b/gplugin/tests/test-version-compare.c
@@ -149,8 +149,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
diff --git a/gplugin/tests/test-versioned-dependencies.c b/gplugin/tests/test-versioned-dependencies.c
--- a/gplugin/tests/test-versioned-dependencies.c
+++ b/gplugin/tests/test-versioned-dependencies.c
@@ -23,7 +23,7 @@
  * Helpers
  *****************************************************************************/
 static void
-_test_plugin_loaded(G_GNUC_UNUSED GPluginPlugin *dependent, const gchar *id)
+_test_plugin_loaded(G_GNUC_UNUSED GPluginPlugin *dependent, const char *id)
 {
 	GPluginManager *manager = gplugin_manager_get_default();
 	GPluginPlugin *plugin = NULL;
@@ -88,8 +88,8 @@
 /******************************************************************************
  * Main
  *****************************************************************************/
-gint
-main(gint argc, gchar **argv)
+int
+main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
 
