diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-10-14 11:27:02 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-10-14 11:37:45 -0400 |
commit | 3989fcaa2dad9dbf689c29729a11cb731e9264ca (patch) | |
tree | 23d28d46779a792dea0ad340417e1a636878ac37 /tests | |
parent | 850cb5a5c849322a71b08304b69d2214250ecaa3 (diff) |
Use g_assert_cmpstr() for better output
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wocky-http-proxy-test.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/wocky-http-proxy-test.c b/tests/wocky-http-proxy-test.c index 41d72fb..720b263 100644 --- a/tests/wocky-http-proxy-test.c +++ b/tests/wocky-http-proxy-test.c @@ -174,19 +174,18 @@ server_thread (gpointer user_data) buffer = g_data_input_stream_read_line (data_in, NULL, data->thread_cancellable, NULL); - g_assert (buffer != NULL); - g_assert (!wocky_strdiff ("CONNECT to:443 HTTP/1.0", buffer)); + g_assert_cmpstr (buffer, ==, "CONNECT to:443 HTTP/1.0"); do { g_free (buffer); buffer = g_data_input_stream_read_line (data_in, NULL, data->thread_cancellable, NULL); - g_assert (buffer); + g_assert (buffer != NULL); if (g_ascii_strncasecmp ("Host:", buffer, 5) == 0) { has_host++; - g_assert (!wocky_strdiff ("Host: to:443", buffer)); + g_assert_cmpstr (buffer, ==, "Host: to:443"); } else if (g_ascii_strncasecmp ("User-Agent:", buffer, 11) == 0) has_user_agent++; @@ -210,7 +209,7 @@ server_thread (gpointer user_data) while (*received_cred == ' ') received_cred++; - g_assert (!wocky_strdiff (base64_cred, received_cred)); + g_assert_cmpstr (base64_cred, ==, received_cred); g_free (base64_cred); } } while (buffer[0] != '\0'); |