mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
added more g_pollable_input_stream_is_readable checks
This commit is contained in:
parent
9e89749e52
commit
e1e5fa0600
@ -38,10 +38,13 @@ poll_source_callback (GPollableInputStream *in,
|
||||
gssize nread;
|
||||
gboolean *success = user_data;
|
||||
|
||||
g_assert_true (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (in)));
|
||||
|
||||
nread = g_pollable_input_stream_read_nonblocking (in, buf, 2, NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_cmpint (nread, ==, 2);
|
||||
g_assert_cmpstr (buf, ==, "x");
|
||||
g_assert_false (g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (in)));
|
||||
|
||||
*success = TRUE;
|
||||
return G_SOURCE_REMOVE;
|
||||
|
Loading…
Reference in New Issue
Block a user