mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 04:02:09 +01:00
Added test case for g_dbus_is_error_name
This commit is contained in:
parent
5b9a8e2048
commit
a70df97c63
@ -3204,7 +3204,7 @@ g_dbus_message_set_error_name (GDBusMessage *message,
|
||||
const gchar *value)
|
||||
{
|
||||
g_return_if_fail (G_IS_DBUS_MESSAGE (message));
|
||||
g_return_if_fail (value == NULL || g_dbus_is_interface_name (value));
|
||||
g_return_if_fail (value == NULL || g_dbus_is_error_name (value));
|
||||
set_string_header (message, G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME, value);
|
||||
}
|
||||
|
||||
|
@ -1162,9 +1162,15 @@ test_validate_names (void)
|
||||
g_assert (!g_dbus_is_unique_name (names[n].string));
|
||||
|
||||
if (names[n].interface)
|
||||
g_assert (g_dbus_is_interface_name (names[n].string));
|
||||
{
|
||||
g_assert (g_dbus_is_interface_name (names[n].string));
|
||||
g_assert (g_dbus_is_error_name (names[n].string));
|
||||
}
|
||||
else
|
||||
g_assert (!g_dbus_is_interface_name (names[n].string));
|
||||
{
|
||||
g_assert (!g_dbus_is_interface_name (names[n].string));
|
||||
g_assert (!g_dbus_is_error_name (names[n].string));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user