mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
test/utils: Add vararg variant of meta_test_client_do()
To be used by wrapper that puts the error in a g_error(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2237>
This commit is contained in:
parent
5e3f89e342
commit
68fd9bf534
@ -213,15 +213,12 @@ test_client_line_read (GObject *source,
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_test_client_do (MetaTestClient *client,
|
||||
GError **error,
|
||||
...)
|
||||
meta_test_client_dov (MetaTestClient *client,
|
||||
GError **error,
|
||||
va_list vap)
|
||||
{
|
||||
GString *command = g_string_new (NULL);
|
||||
char *line = NULL;
|
||||
va_list vap;
|
||||
|
||||
va_start (vap, error);
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
@ -239,8 +236,6 @@ meta_test_client_do (MetaTestClient *client,
|
||||
g_free (quoted);
|
||||
}
|
||||
|
||||
va_end (vap);
|
||||
|
||||
g_string_append_c (command, '\n');
|
||||
|
||||
if (!g_data_output_stream_put_string (client->in, command->str,
|
||||
@ -287,6 +282,21 @@ meta_test_client_do (MetaTestClient *client,
|
||||
return *error == NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_test_client_do (MetaTestClient *client,
|
||||
GError **error,
|
||||
...)
|
||||
{
|
||||
va_list vap;
|
||||
gboolean retval;
|
||||
|
||||
va_start (vap, error);
|
||||
retval = meta_test_client_dov (client, error, vap);
|
||||
va_end (vap);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_test_client_wait (MetaTestClient *client,
|
||||
GError **error)
|
||||
|
@ -73,6 +73,11 @@ META_EXPORT
|
||||
gboolean meta_test_client_wait (MetaTestClient *client,
|
||||
GError **error);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_test_client_dov (MetaTestClient *client,
|
||||
GError **error,
|
||||
va_list vap);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_test_client_do (MetaTestClient *client,
|
||||
GError **error,
|
||||
|
Loading…
Reference in New Issue
Block a user