summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorMorten Mjelva <morten.mjelva@gmail.com>2011-06-17 14:29:22 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-07-13 13:13:54 +0200
commit6b6703a8f068fb4e2e49d833d2f3467888e10321 (patch)
tree867f6e0124dee5f2f88023aade359082eeb68bcf /tests/lib
parenta2ae63f0c84f866567b85c271e7be279580580c2 (diff)
Factor out _tp_destroy_socket_control_list() to tests/lib/util
https://bugs.freedesktop.org/show_bug.cgi?id=38997
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/stream-tube-chan.c9
-rw-r--r--tests/lib/util.c7
-rw-r--r--tests/lib/util.h2
3 files changed, 10 insertions, 8 deletions
diff --git a/tests/lib/stream-tube-chan.c b/tests/lib/stream-tube-chan.c
index d553c821a..f8d36a540 100644
--- a/tests/lib/stream-tube-chan.c
+++ b/tests/lib/stream-tube-chan.c
@@ -60,13 +60,6 @@ struct _TpTestsStreamTubeChannelPrivate {
};
static void
-destroy_socket_control_list (gpointer data)
-{
- GArray *tab = data;
- g_array_free (tab, TRUE);
-}
-
-static void
create_supported_socket_types (TpTestsStreamTubeChannel *self)
{
TpSocketAccessControl access_control;
@@ -74,7 +67,7 @@ create_supported_socket_types (TpTestsStreamTubeChannel *self)
g_assert (self->priv->supported_socket_types == NULL);
self->priv->supported_socket_types = g_hash_table_new_full (NULL, NULL,
- NULL, destroy_socket_control_list);
+ NULL, _tp_destroy_socket_control_list);
/* Socket_Address_Type_Unix */
unix_tab = g_array_sized_new (FALSE, FALSE, sizeof (TpSocketAccessControl),
diff --git a/tests/lib/util.c b/tests/lib/util.c
index 224ceffa4..d18647b41 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -310,6 +310,13 @@ tp_tests_init (int *argc,
g_test_init (argc, argv, NULL);
}
+void
+_tp_destroy_socket_control_list (gpointer data)
+{
+ GArray *tab = data;
+ g_array_free (tab, TRUE);
+}
+
GValue *
_tp_create_local_socket (TpSocketAddressType address_type,
TpSocketAccessControl access_control,
diff --git a/tests/lib/util.h b/tests/lib/util.h
index 5a49c2892..d170eab69 100644
--- a/tests/lib/util.h
+++ b/tests/lib/util.h
@@ -63,4 +63,6 @@ GValue *_tp_create_local_socket (TpSocketAddressType address_type,
gchar **unix_address,
GError **error);
+void _tp_destroy_socket_control_list (gpointer data);
+
#endif /* #ifndef __TP_TESTS_LIB_UTIL_H__ */