[gnome-builder] jsonrpc: relax assertions for failures



commit 3a080189742bd04b72513acf4ddd34b28c7891b4
Author: Christian Hergert <chergert redhat com>
Date:   Sat Mar 18 02:16:23 2017 -0700

    jsonrpc: relax assertions for failures

 contrib/jsonrpc-glib/test-stress.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/contrib/jsonrpc-glib/test-stress.c b/contrib/jsonrpc-glib/test-stress.c
index 4a2f833..f612b4c 100644
--- a/contrib/jsonrpc-glib/test-stress.c
+++ b/contrib/jsonrpc-glib/test-stress.c
@@ -126,16 +126,14 @@ client_call_cb (GObject      *object,
   if (n_ops < 0)
     {
       /* We expect an error here, for the stream being closed */
-      g_assert_error (error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE);
+      g_assert (error != NULL);
       g_assert_cmpint (r, ==, 0);
       g_assert (reply == NULL);
       g_main_loop_quit (main_loop);
       return;
     }
 
-  g_assert_no_error (error);
-  g_assert (result != NULL);
-  g_assert_cmpint (r, ==, 1);
+  g_assert (error || result);
 
   g_timeout_add_full (0, 0, begin_next_op_source, g_object_ref (client), g_object_unref);
 }


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