[glib/wip/silviol/gsocket_flags: 2/2] added more g_pollable_input_stream_is_readable checks



commit e1e5fa0600bc1e38a04106127ccc6f501cdc3384
Author: Silvio Lazzeretti <silviola amazon com>
Date:   Fri Dec 14 17:07:22 2018 +0100

    added more g_pollable_input_stream_is_readable checks

 gio/tests/pollable.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gio/tests/pollable.c b/gio/tests/pollable.c
index 75dca95ae..b8c8710bb 100644
--- a/gio/tests/pollable.c
+++ b/gio/tests/pollable.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]