[wing] named-pipe: add to test to check the default timeout value



commit 3762dde098a0522adf205d9ed9205be09d73f498
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Aug 11 08:48:22 2016 +0200

    named-pipe: add to test to check the default timeout value

 tests/named-pipe.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/tests/named-pipe.c b/tests/named-pipe.c
index 275a6b9..de4b7c2 100644
--- a/tests/named-pipe.c
+++ b/tests/named-pipe.c
@@ -18,6 +18,7 @@
  */
 
 #include <wing/wing.h>
+#include <windows.h>
 
 static void
 test_add_named_pipe (void)
@@ -369,6 +370,19 @@ test_multi_client_basic (void)
   g_object_unref (cancellable);
 }
 
+static void
+test_client_default_timeout (void)
+{
+  WingNamedPipeClient *client;
+  guint timeout;
+
+  client = wing_named_pipe_client_new ();
+  g_object_get (G_OBJECT (client), "timeout", &timeout, NULL);
+
+  g_assert_cmpuint (timeout, ==, NMPWAIT_WAIT_FOREVER);
+  g_object_unref (client);
+}
+
 int
 main (int   argc,
       char *argv[])
@@ -385,6 +399,7 @@ main (int   argc,
   g_test_add_func ("/named-pipes/accept-cancel", test_accept_cancel);
   g_test_add_func ("/named-pipes/connect-accept-cancel", test_connect_accept_cancel);
   g_test_add_func ("/named-pipes/multi-client-basic", test_multi_client_basic);
+  g_test_add_func ("/named-pipes/client-default-timeout", test_client_default_timeout);
 
   return g_test_run ();
 }


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