4 #include "gdbus-sessionbus.h"
13 activate (GAction *action,
17 Activation *activation = user_data;
20 activation->params = g_variant_ref (parameter);
22 activation->params = NULL;
23 activation->did_run = TRUE;
29 Activation a = { 0, };
30 GSimpleAction *action;
32 GVariantType *parameter_type;
34 GVariantType *state_type;
37 action = g_simple_action_new ("foo", NULL);
38 g_assert (g_action_get_enabled (G_ACTION (action)));
39 g_assert (g_action_get_parameter_type (G_ACTION (action)) == NULL);
40 g_assert (g_action_get_state_type (G_ACTION (action)) == NULL);
41 g_assert (g_action_get_state_hint (G_ACTION (action)) == NULL);
42 g_assert (g_action_get_state (G_ACTION (action)) == NULL);
45 "parameter-type", ¶meter_type,
47 "state-type", &state_type,
50 g_assert_cmpstr (name, ==, "foo");
51 g_assert (parameter_type == NULL);
53 g_assert (state_type == NULL);
54 g_assert (state == NULL);
57 g_signal_connect (action, "activate", G_CALLBACK (activate), &a);
58 g_assert (!a.did_run);
59 g_action_activate (G_ACTION (action), NULL);
63 g_simple_action_set_enabled (action, FALSE);
64 g_action_activate (G_ACTION (action), NULL);
65 g_assert (!a.did_run);
67 if (g_test_undefined ())
69 g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
70 "*assertion*g_variant_is_of_type*failed*");
71 g_action_activate (G_ACTION (action), g_variant_new_string ("xxx"));
72 g_test_assert_expected_messages ();
75 g_object_unref (action);
76 g_assert (!a.did_run);
78 action = g_simple_action_new ("foo", G_VARIANT_TYPE_STRING);
79 g_assert (g_action_get_enabled (G_ACTION (action)));
80 g_assert (g_variant_type_equal (g_action_get_parameter_type (G_ACTION (action)), G_VARIANT_TYPE_STRING));
81 g_assert (g_action_get_state_type (G_ACTION (action)) == NULL);
82 g_assert (g_action_get_state_hint (G_ACTION (action)) == NULL);
83 g_assert (g_action_get_state (G_ACTION (action)) == NULL);
85 g_signal_connect (action, "activate", G_CALLBACK (activate), &a);
86 g_assert (!a.did_run);
87 g_action_activate (G_ACTION (action), g_variant_new_string ("Hello world"));
89 g_assert_cmpstr (g_variant_get_string (a.params, NULL), ==, "Hello world");
90 g_variant_unref (a.params);
93 if (g_test_undefined ())
95 g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
96 "*assertion*!= NULL*failed*");
97 g_action_activate (G_ACTION (action), NULL);
98 g_test_assert_expected_messages ();
101 g_object_unref (action);
102 g_assert (!a.did_run);
106 strv_has_string (gchar **haystack,
111 for (n = 0; haystack != NULL && haystack[n] != NULL; n++)
113 if (g_strcmp0 (haystack[n], needle) == 0)
120 strv_strv_cmp (gchar **a, gchar **b)
124 for (n = 0; a[n] != NULL; n++)
126 if (!strv_has_string (b, a[n]))
130 for (n = 0; b[n] != NULL; n++)
132 if (!strv_has_string (a, b[n]))
140 strv_set_equal (gchar **strv, ...)
149 va_start (list, strv);
152 str = va_arg (list, const gchar *);
155 if (!strv_has_string (strv, str))
165 res = g_strv_length ((gchar**)strv) == count;
171 test_simple_group (void)
173 GSimpleActionGroup *group;
174 Activation a = { 0, };
175 GSimpleAction *simple;
180 simple = g_simple_action_new ("foo", NULL);
181 g_signal_connect (simple, "activate", G_CALLBACK (activate), &a);
182 g_assert (!a.did_run);
183 g_action_activate (G_ACTION (simple), NULL);
184 g_assert (a.did_run);
187 group = g_simple_action_group_new ();
188 g_simple_action_group_insert (group, G_ACTION (simple));
189 g_object_unref (simple);
191 g_assert (!a.did_run);
192 g_action_group_activate_action (G_ACTION_GROUP (group), "foo", NULL);
193 g_assert (a.did_run);
195 simple = g_simple_action_new_stateful ("bar", G_VARIANT_TYPE_STRING, g_variant_new_string ("hihi"));
196 g_simple_action_group_insert (group, G_ACTION (simple));
197 g_object_unref (simple);
199 g_assert (g_action_group_has_action (G_ACTION_GROUP (group), "foo"));
200 g_assert (g_action_group_has_action (G_ACTION_GROUP (group), "bar"));
201 g_assert (!g_action_group_has_action (G_ACTION_GROUP (group), "baz"));
202 actions = g_action_group_list_actions (G_ACTION_GROUP (group));
203 g_assert_cmpint (g_strv_length (actions), ==, 2);
204 g_assert (strv_set_equal (actions, "foo", "bar", NULL));
205 g_strfreev (actions);
206 g_assert (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "foo"));
207 g_assert (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
208 g_assert (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "foo") == NULL);
209 g_assert (g_variant_type_equal (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
210 g_assert (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "foo") == NULL);
211 g_assert (g_variant_type_equal (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
212 g_assert (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "foo") == NULL);
213 g_assert (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "bar") == NULL);
214 g_assert (g_action_group_get_action_state (G_ACTION_GROUP (group), "foo") == NULL);
215 state = g_action_group_get_action_state (G_ACTION_GROUP (group), "bar");
216 g_assert (g_variant_type_equal (g_variant_get_type (state), G_VARIANT_TYPE_STRING));
217 g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "hihi");
218 g_variant_unref (state);
220 g_action_group_change_action_state (G_ACTION_GROUP (group), "bar", g_variant_new_string ("boo"));
221 state = g_action_group_get_action_state (G_ACTION_GROUP (group), "bar");
222 g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "boo");
223 g_variant_unref (state);
225 action = g_simple_action_group_lookup (group, "bar");
226 g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
227 g_assert (!g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
229 g_simple_action_group_remove (group, "bar");
230 action = g_simple_action_group_lookup (group, "foo");
231 g_assert_cmpstr (g_action_get_name (action), ==, "foo");
232 action = g_simple_action_group_lookup (group, "bar");
233 g_assert (action == NULL);
236 g_object_unref (group);
237 g_assert (!a.did_run);
243 GSimpleAction *action;
246 action = g_simple_action_new_stateful ("foo", NULL, g_variant_new_string ("hihi"));
247 g_assert (g_action_get_enabled (G_ACTION (action)));
248 g_assert (g_action_get_parameter_type (G_ACTION (action)) == NULL);
249 g_assert (g_action_get_state_hint (G_ACTION (action)) == NULL);
250 g_assert (g_variant_type_equal (g_action_get_state_type (G_ACTION (action)),
251 G_VARIANT_TYPE_STRING));
252 state = g_action_get_state (G_ACTION (action));
253 g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "hihi");
254 g_variant_unref (state);
256 if (g_test_undefined ())
258 g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
259 "*assertion*g_variant_is_of_type*failed*");
260 g_simple_action_set_state (action, g_variant_new_int32 (123));
261 g_test_assert_expected_messages ();
264 g_simple_action_set_state (action, g_variant_new_string ("hello"));
265 state = g_action_get_state (G_ACTION (action));
266 g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "hello");
267 g_variant_unref (state);
269 g_object_unref (action);
271 action = g_simple_action_new ("foo", NULL);
273 if (g_test_undefined ())
275 g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
276 "*assertion*!= NULL*failed*");
277 g_simple_action_set_state (action, g_variant_new_int32 (123));
278 g_test_assert_expected_messages ();
281 g_object_unref (action);
284 static gboolean foo_activated = FALSE;
285 static gboolean bar_activated = FALSE;
288 activate_foo (GSimpleAction *simple,
292 g_assert (user_data == GINT_TO_POINTER (123));
293 g_assert (parameter == NULL);
294 foo_activated = TRUE;
298 activate_bar (GSimpleAction *simple,
302 g_assert (user_data == GINT_TO_POINTER (123));
303 g_assert_cmpstr (g_variant_get_string (parameter, NULL), ==, "param");
304 bar_activated = TRUE;
308 change_volume_state (GSimpleAction *action,
314 requested = g_variant_get_int32 (value);
316 /* Volume only goes from 0 to 10 */
317 if (0 <= requested && requested <= 10)
318 g_simple_action_set_state (action, value);
324 const GActionEntry entries[] = {
325 { "foo", activate_foo },
326 { "bar", activate_bar, "s" },
327 { "toggle", NULL, NULL, "false" },
328 { "volume", NULL, NULL, "0", change_volume_state }
330 GSimpleActionGroup *actions;
333 actions = g_simple_action_group_new ();
334 g_simple_action_group_add_entries (actions, entries,
335 G_N_ELEMENTS (entries),
336 GINT_TO_POINTER (123));
338 g_assert (!foo_activated);
339 g_action_group_activate_action (G_ACTION_GROUP (actions), "foo", NULL);
340 g_assert (foo_activated);
341 foo_activated = FALSE;
343 g_assert (!bar_activated);
344 g_action_group_activate_action (G_ACTION_GROUP (actions), "bar",
345 g_variant_new_string ("param"));
346 g_assert (bar_activated);
347 g_assert (!foo_activated);
349 if (g_test_undefined ())
351 const GActionEntry bad_type = {
352 "bad-type", NULL, "ss"
354 const GActionEntry bad_state = {
355 "bad-state", NULL, NULL, "flse"
358 g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
359 "*not a valid GVariant type string*");
360 g_simple_action_group_add_entries (actions, &bad_type, 1, NULL);
361 g_test_assert_expected_messages ();
363 g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
364 "*could not parse*");
365 g_simple_action_group_add_entries (actions, &bad_state, 1, NULL);
366 g_test_assert_expected_messages ();
369 state = g_action_group_get_action_state (G_ACTION_GROUP (actions), "volume");
370 g_assert_cmpint (g_variant_get_int32 (state), ==, 0);
371 g_variant_unref (state);
374 g_action_group_change_action_state (G_ACTION_GROUP (actions), "volume",
375 g_variant_new_int32 (7));
376 state = g_action_group_get_action_state (G_ACTION_GROUP (actions), "volume");
377 g_assert_cmpint (g_variant_get_int32 (state), ==, 7);
378 g_variant_unref (state);
380 /* should not change */
381 g_action_group_change_action_state (G_ACTION_GROUP (actions), "volume",
382 g_variant_new_int32 (11));
383 state = g_action_group_get_action_state (G_ACTION_GROUP (actions), "volume");
384 g_assert_cmpint (g_variant_get_int32 (state), ==, 7);
385 g_variant_unref (state);
387 g_object_unref (actions);
391 GHashTable *activation_counts;
394 count_activation (const gchar *action)
398 if (activation_counts == NULL)
399 activation_counts = g_hash_table_new (g_str_hash, g_str_equal);
400 count = GPOINTER_TO_INT (g_hash_table_lookup (activation_counts, action));
402 g_hash_table_insert (activation_counts, (gpointer)action, GINT_TO_POINTER (count));
406 activation_count (const gchar *action)
408 if (activation_counts == NULL)
411 return GPOINTER_TO_INT (g_hash_table_lookup (activation_counts, action));
415 activate_action (GSimpleAction *action, GVariant *parameter, gpointer user_data)
417 count_activation (g_action_get_name (G_ACTION (action)));
421 activate_toggle (GSimpleAction *action, GVariant *parameter, gpointer user_data)
423 GVariant *old_state, *new_state;
425 count_activation (g_action_get_name (G_ACTION (action)));
427 old_state = g_action_get_state (G_ACTION (action));
428 new_state = g_variant_new_boolean (!g_variant_get_boolean (old_state));
429 g_simple_action_set_state (action, new_state);
430 g_variant_unref (old_state);
434 activate_radio (GSimpleAction *action, GVariant *parameter, gpointer user_data)
438 count_activation (g_action_get_name (G_ACTION (action)));
440 new_state = g_variant_new_string (g_variant_get_string (parameter, NULL));
441 g_simple_action_set_state (action, new_state);
445 compare_action_groups (GActionGroup *a, GActionGroup *b)
452 gboolean aenabled, benabled;
453 const GVariantType *aparameter_type, *bparameter_type;
454 const GVariantType *astate_type, *bstate_type;
455 GVariant *astate_hint, *bstate_hint;
456 GVariant *astate, *bstate;
458 alist = g_action_group_list_actions (a);
459 blist = g_action_group_list_actions (b);
460 equal = strv_strv_cmp (alist, blist);
462 for (i = 0; equal && alist[i]; i++)
464 ares = g_action_group_query_action (a, alist[i], &aenabled, &aparameter_type, &astate_type, &astate_hint, &astate);
465 bres = g_action_group_query_action (b, alist[i], &benabled, &bparameter_type, &bstate_type, &bstate_hint, &bstate);
469 equal = equal && (aenabled == benabled);
470 equal = equal && ((!aparameter_type && !bparameter_type) || g_variant_type_equal (aparameter_type, bparameter_type));
471 equal = equal && ((!astate_type && !bstate_type) || g_variant_type_equal (astate_type, bstate_type));
472 equal = equal && ((!astate_hint && !bstate_hint) || g_variant_equal (astate_hint, bstate_hint));
473 equal = equal && ((!astate && !bstate) || g_variant_equal (astate, bstate));
476 g_variant_unref (astate_hint);
478 g_variant_unref (bstate_hint);
480 g_variant_unref (astate);
482 g_variant_unref (bstate);
495 stop_loop (gpointer data)
497 GMainLoop *loop = data;
499 g_main_loop_quit (loop);
501 return G_SOURCE_REMOVE;
504 static GActionEntry exported_entries[] = {
505 { "undo", activate_action, NULL, NULL, NULL },
506 { "redo", activate_action, NULL, NULL, NULL },
507 { "cut", activate_action, NULL, NULL, NULL },
508 { "copy", activate_action, NULL, NULL, NULL },
509 { "paste", activate_action, NULL, NULL, NULL },
510 { "bold", activate_toggle, NULL, "true", NULL },
511 { "lang", activate_radio, "s", "'latin'", NULL },
515 list_cb (GObject *source,
519 GDBusConnection *bus = G_DBUS_CONNECTION (source);
520 GMainLoop *loop = user_data;
521 GError *error = NULL;
525 v = g_dbus_connection_call_finish (bus, res, &error);
527 g_variant_get (v, "(^a&s)", &actions);
528 g_assert_cmpint (g_strv_length (actions), ==, G_N_ELEMENTS (exported_entries));
531 g_main_loop_quit (loop);
535 call_list (gpointer user_data)
537 GDBusConnection *bus;
539 bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
540 g_dbus_connection_call (bus,
541 g_dbus_connection_get_unique_name (bus),
552 g_object_unref (bus);
554 return G_SOURCE_REMOVE;
558 describe_cb (GObject *source,
562 GDBusConnection *bus = G_DBUS_CONNECTION (source);
563 GMainLoop *loop = user_data;
564 GError *error = NULL;
570 v = g_dbus_connection_call_finish (bus, res, &error);
572 /* FIXME: there's an extra level of tuplelization in here */
573 g_variant_get (v, "((bgav))", &enabled, ¶m, &iter);
574 g_assert (enabled == TRUE);
575 g_assert_cmpstr (param, ==, "");
576 g_assert_cmpint (g_variant_iter_n_children (iter), ==, 0);
578 g_variant_iter_free (iter);
581 g_main_loop_quit (loop);
585 call_describe (gpointer user_data)
587 GDBusConnection *bus;
589 bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
590 g_dbus_connection_call (bus,
591 g_dbus_connection_get_unique_name (bus),
595 g_variant_new ("(s)", "copy"),
602 g_object_unref (bus);
604 return G_SOURCE_REMOVE;
608 test_dbus_export (void)
610 GDBusConnection *bus;
611 GSimpleActionGroup *group;
612 GDBusActionGroup *proxy;
613 GSimpleAction *action;
615 GError *error = NULL;
620 loop = g_main_loop_new (NULL, FALSE);
623 bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
625 group = g_simple_action_group_new ();
626 g_simple_action_group_add_entries (group,
628 G_N_ELEMENTS (exported_entries),
631 id = g_dbus_connection_export_action_group (bus, "/", G_ACTION_GROUP (group), &error);
632 g_assert_no_error (error);
634 proxy = g_dbus_action_group_get (bus, g_dbus_connection_get_unique_name (bus), "/");
636 actions = g_action_group_list_actions (G_ACTION_GROUP (proxy));
637 g_assert_cmpint (g_strv_length (actions), ==, 0);
638 g_strfreev (actions);
640 g_timeout_add (100, stop_loop, loop);
641 g_main_loop_run (loop);
643 actions = g_action_group_list_actions (G_ACTION_GROUP (proxy));
644 g_assert_cmpint (g_strv_length (actions), ==, G_N_ELEMENTS (exported_entries));
645 g_strfreev (actions);
647 /* check that calling "List" works too */
648 g_idle_add (call_list, loop);
649 g_main_loop_run (loop);
651 /* check that calling "Describe" works */
652 g_idle_add (call_describe, loop);
653 g_main_loop_run (loop);
655 /* test that the initial transfer works */
656 g_assert (G_IS_DBUS_ACTION_GROUP (proxy));
657 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
659 /* test that various changes get propagated from group to proxy */
660 action = g_simple_action_new_stateful ("italic", NULL, g_variant_new_boolean (FALSE));
661 g_simple_action_group_insert (group, G_ACTION (action));
662 g_object_unref (action);
664 g_timeout_add (100, stop_loop, loop);
665 g_main_loop_run (loop);
667 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
669 action = G_SIMPLE_ACTION (g_simple_action_group_lookup (group, "cut"));
670 g_simple_action_set_enabled (action, FALSE);
672 g_timeout_add (100, stop_loop, loop);
673 g_main_loop_run (loop);
675 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
677 action = G_SIMPLE_ACTION (g_simple_action_group_lookup (group, "bold"));
678 g_simple_action_set_state (action, g_variant_new_boolean (FALSE));
680 g_timeout_add (100, stop_loop, loop);
681 g_main_loop_run (loop);
683 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
685 g_simple_action_group_remove (group, "italic");
687 g_timeout_add (100, stop_loop, loop);
688 g_main_loop_run (loop);
690 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
692 /* test that activations and state changes propagate the other way */
694 g_assert_cmpint (activation_count ("copy"), ==, 0);
695 g_action_group_activate_action (G_ACTION_GROUP (proxy), "copy", NULL);
697 g_timeout_add (100, stop_loop, loop);
698 g_main_loop_run (loop);
700 g_assert_cmpint (activation_count ("copy"), ==, 1);
701 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
703 g_assert_cmpint (activation_count ("bold"), ==, 0);
704 g_action_group_activate_action (G_ACTION_GROUP (proxy), "bold", NULL);
706 g_timeout_add (100, stop_loop, loop);
707 g_main_loop_run (loop);
709 g_assert_cmpint (activation_count ("bold"), ==, 1);
710 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
711 v = g_action_group_get_action_state (G_ACTION_GROUP (group), "bold");
712 g_assert (g_variant_get_boolean (v));
715 g_action_group_change_action_state (G_ACTION_GROUP (proxy), "bold", g_variant_new_boolean (FALSE));
717 g_timeout_add (100, stop_loop, loop);
718 g_main_loop_run (loop);
720 g_assert_cmpint (activation_count ("bold"), ==, 1);
721 g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
722 v = g_action_group_get_action_state (G_ACTION_GROUP (group), "bold");
723 g_assert (!g_variant_get_boolean (v));
726 g_dbus_connection_unexport_action_group (bus, id);
728 g_object_unref (proxy);
729 g_object_unref (group);
730 g_main_loop_unref (loop);
731 g_object_unref (bus);
737 do_export (gpointer data)
739 GActionGroup *group = data;
742 GError *error = NULL;
744 GDBusConnection *bus;
748 ctx = g_main_context_new ();
750 g_main_context_push_thread_default (ctx);
752 bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
753 path = g_strdup_printf("/%p", data);
755 for (i = 0; i < 100000; i++)
757 id = g_dbus_connection_export_action_group (bus, path, G_ACTION_GROUP (group), &error);
758 g_assert_no_error (error);
760 action = g_simple_action_group_lookup (G_SIMPLE_ACTION_GROUP (group), "a");
761 g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
762 !g_action_get_enabled (action));
764 g_dbus_connection_unexport_action_group (bus, id);
766 while (g_main_context_iteration (ctx, FALSE));
770 g_object_unref (bus);
772 g_main_context_pop_thread_default (ctx);
774 g_main_context_unref (ctx);
780 test_dbus_threaded (void)
782 GSimpleActionGroup *group[10];
784 static GActionEntry entries[] = {
785 { "a", activate_action, NULL, NULL, NULL },
786 { "b", activate_action, NULL, NULL, NULL },
792 for (i = 0; i < 10; i++)
794 group[i] = g_simple_action_group_new ();
795 g_simple_action_group_add_entries (group[i], entries, G_N_ELEMENTS (entries), NULL);
796 export[i] = g_thread_new ("export", do_export, group[i]);
799 for (i = 0; i < 10; i++)
800 g_thread_join (export[i]);
802 for (i = 0; i < 10; i++)
803 g_object_unref (group[i]);
809 test_bug679509 (void)
811 GDBusConnection *bus;
812 GDBusActionGroup *proxy;
815 loop = g_main_loop_new (NULL, FALSE);
818 bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
820 proxy = g_dbus_action_group_get (bus, g_dbus_connection_get_unique_name (bus), "/");
821 g_strfreev (g_action_group_list_actions (G_ACTION_GROUP (proxy)));
822 g_object_unref (proxy);
824 g_timeout_add (100, stop_loop, loop);
825 g_main_loop_run (loop);
827 g_main_loop_unref (loop);
828 g_object_unref (bus);
834 main (int argc, char **argv)
837 g_test_init (&argc, &argv, NULL);
839 g_test_add_func ("/actions/basic", test_basic);
840 g_test_add_func ("/actions/simplegroup", test_simple_group);
841 g_test_add_func ("/actions/stateful", test_stateful);
842 g_test_add_func ("/actions/entries", test_entries);
843 g_test_add_func ("/actions/dbus/export", test_dbus_export);
844 g_test_add_func ("/actions/dbus/threaded", test_dbus_threaded);
845 g_test_add_func ("/actions/dbus/bug679509", test_bug679509);
847 return g_test_run ();