mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
tests: Use g_assert_(non)null instead of g_assert
Just a style change, on more recent GLib would print a more friendly error report. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <uril@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
69a5cfc741
commit
70f56ad2fa
@ -943,7 +943,7 @@ Test* test_new(SpiceCoreInterface* core)
|
||||
spice_server_destroy(server);
|
||||
}
|
||||
|
||||
g_assert(test->server != NULL);
|
||||
g_assert_nonnull(test->server);
|
||||
|
||||
printf("TESTER: listening on port %d (unsecure)\n", port);
|
||||
g_test_log_set_fatal_handler(NULL, NULL);
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
#include <gio/gio.h>
|
||||
#include <gio/gunixsocketaddress.h>
|
||||
|
||||
#include "test-glib-compat.h"
|
||||
|
||||
/* Arbitrary base port, we want a port which is not in use by the system, and
|
||||
* by another of our tests (in case of parallel runs)
|
||||
*/
|
||||
@ -189,8 +191,8 @@ static gpointer check_no_connect_thread(gpointer data)
|
||||
GIOStream *stream;
|
||||
|
||||
stream = fake_client_connect(connectable, &error);
|
||||
g_assert(error != NULL);
|
||||
g_assert(stream == NULL);
|
||||
g_assert_nonnull(error);
|
||||
g_assert_null(stream);
|
||||
g_clear_error(&error);
|
||||
|
||||
g_object_unref(connectable);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user