[librest] tests/proxy: Make sure GError is unset when call succeeds



commit 92a063498d3f23c1fefe4ee70d86c329e325c1ad
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Tue Sep 2 18:42:10 2014 +0200

    tests/proxy: Make sure GError is unset when call succeeds
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735921

 tests/proxy.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/proxy.c b/tests/proxy.c
index 7f97e9c..01316dd 100644
--- a/tests/proxy.c
+++ b/tests/proxy.c
@@ -115,6 +115,7 @@ ping_test (RestProxy *proxy)
     g_object_unref (call);
     return;
   }
+  g_assert(error == NULL);
 
   if (rest_proxy_call_get_status_code (call) != SOUP_STATUS_OK) {
     g_printerr ("wrong response code\n");
@@ -148,6 +149,7 @@ echo_test (RestProxy *proxy)
     g_object_unref (call);
     return;
   }
+  g_assert(error == NULL);
 
   if (rest_proxy_call_get_status_code (call) != SOUP_STATUS_OK) {
     g_printerr ("wrong response code\n");
@@ -187,6 +189,7 @@ reverse_test (RestProxy *proxy)
     g_object_unref (call);
     return;
   }
+  g_assert(error == NULL);
 
   if (rest_proxy_call_get_status_code (call) != SOUP_STATUS_OK) {
     g_printerr ("wrong response code\n");
@@ -229,6 +232,7 @@ status_ok_test (RestProxy *proxy, int status)
     g_object_unref (call);
     return;
   }
+  g_assert(error == NULL);
 
   if (rest_proxy_call_get_status_code (call) != status) {
     g_printerr ("wrong response code, got %d\n", rest_proxy_call_get_status_code (call));
@@ -285,6 +289,7 @@ test_status_ok (RestProxy *proxy, const char *function)
     g_object_unref (call);
     return;
   }
+  g_assert(error == NULL);
 
   if (rest_proxy_call_get_status_code (call) != SOUP_STATUS_OK) {
     g_printerr ("wrong response code, got %d\n", rest_proxy_call_get_status_code (call));


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