mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
tests: move tests to new _get_filename() API
This API was introduced to save a few lines of code here and there, so let's start by removing a bunch from our own tests. https://bugzilla.gnome.org/show_bug.cgi?id=549783
This commit is contained in:
@@ -762,7 +762,6 @@ test_proxy (void)
|
||||
GDBusProxy *proxy;
|
||||
GDBusConnection *connection;
|
||||
GError *error;
|
||||
gchar *path;
|
||||
|
||||
error = NULL;
|
||||
connection = g_bus_get_sync (G_BUS_TYPE_SESSION,
|
||||
@@ -781,9 +780,7 @@ test_proxy (void)
|
||||
g_assert_no_error (error);
|
||||
|
||||
/* this is safe; testserver will exit once the bus goes away */
|
||||
path = g_test_build_filename (G_TEST_BUILT, "gdbus-testserver", NULL);
|
||||
g_assert (g_spawn_command_line_async (path, NULL));
|
||||
g_free (path);
|
||||
g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
|
||||
|
||||
_g_assert_property_notify (proxy, "g-name-owner");
|
||||
|
||||
@@ -834,8 +831,6 @@ fail_test (gpointer user_data)
|
||||
static void
|
||||
test_async (void)
|
||||
{
|
||||
gchar *path;
|
||||
|
||||
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
|
||||
G_DBUS_PROXY_FLAGS_NONE,
|
||||
NULL, /* GDBusInterfaceInfo */
|
||||
@@ -847,9 +842,7 @@ test_async (void)
|
||||
NULL);
|
||||
|
||||
/* this is safe; testserver will exit once the bus goes away */
|
||||
path = g_test_build_filename (G_TEST_BUILT, "gdbus-testserver", NULL);
|
||||
g_assert (g_spawn_command_line_async (path, NULL));
|
||||
g_free (path);
|
||||
g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
|
||||
|
||||
g_timeout_add (10000, fail_test, NULL);
|
||||
g_main_loop_run (loop);
|
||||
|
Reference in New Issue
Block a user