mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-04 18:18:56 +01:00
tests: Add a test for g_dbus_connection_get_flags()
It was added in !554 but never had a unit test. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1620
This commit is contained in:
@@ -1197,6 +1197,7 @@ test_connection_basic (void)
|
|||||||
GDBusConnection *connection;
|
GDBusConnection *connection;
|
||||||
GError *error;
|
GError *error;
|
||||||
GDBusCapabilityFlags flags;
|
GDBusCapabilityFlags flags;
|
||||||
|
GDBusConnectionFlags connection_flags;
|
||||||
gchar *guid;
|
gchar *guid;
|
||||||
gchar *name;
|
gchar *name;
|
||||||
gboolean closed;
|
gboolean closed;
|
||||||
@@ -1215,6 +1216,11 @@ test_connection_basic (void)
|
|||||||
g_assert (flags == G_DBUS_CAPABILITY_FLAGS_NONE ||
|
g_assert (flags == G_DBUS_CAPABILITY_FLAGS_NONE ||
|
||||||
flags == G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING);
|
flags == G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING);
|
||||||
|
|
||||||
|
connection_flags = g_dbus_connection_get_flags (connection);
|
||||||
|
g_assert_cmpint (connection_flags, ==,
|
||||||
|
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
|
||||||
|
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION);
|
||||||
|
|
||||||
credentials = g_dbus_connection_get_peer_credentials (connection);
|
credentials = g_dbus_connection_get_peer_credentials (connection);
|
||||||
g_assert (credentials == NULL);
|
g_assert (credentials == NULL);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user