mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
tests: Use g_assert_*() rather than g_assert() in gdbus-connection-flush.c
`g_assert()` is compiled out with `G_DISABLE_ASSERT`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
dc0eb5e49a
commit
693e4efeba
@ -179,8 +179,8 @@ setup_client_cb (GObject *source,
|
||||
|
||||
f->client_conn = g_dbus_connection_new_finish (res, &f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (G_IS_DBUS_CONNECTION (f->client_conn));
|
||||
g_assert (f->client_conn == G_DBUS_CONNECTION (source));
|
||||
g_assert_true (G_IS_DBUS_CONNECTION (f->client_conn));
|
||||
g_assert_true (f->client_conn == G_DBUS_CONNECTION (source));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -192,8 +192,8 @@ setup_server_cb (GObject *source,
|
||||
|
||||
f->server_conn = g_dbus_connection_new_finish (res, &f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (G_IS_DBUS_CONNECTION (f->server_conn));
|
||||
g_assert (f->server_conn == G_DBUS_CONNECTION (source));
|
||||
g_assert_true (G_IS_DBUS_CONNECTION (f->server_conn));
|
||||
g_assert_true (f->server_conn == G_DBUS_CONNECTION (source));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -206,21 +206,21 @@ setup (Fixture *f,
|
||||
|
||||
ok = test_pipe (&f->server_istream, &f->client_real_ostream, &f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (G_IS_OUTPUT_STREAM (f->client_real_ostream));
|
||||
g_assert (G_IS_INPUT_STREAM (f->server_istream));
|
||||
g_assert (ok);
|
||||
g_assert_true (G_IS_OUTPUT_STREAM (f->client_real_ostream));
|
||||
g_assert_true (G_IS_INPUT_STREAM (f->server_istream));
|
||||
g_assert_true (ok);
|
||||
|
||||
f->client_ostream = g_object_new (MY_TYPE_OUTPUT_STREAM,
|
||||
"base-stream", f->client_real_ostream,
|
||||
"close-base-stream", TRUE,
|
||||
NULL);
|
||||
g_assert (G_IS_OUTPUT_STREAM (f->client_ostream));
|
||||
g_assert_true (G_IS_OUTPUT_STREAM (f->client_ostream));
|
||||
|
||||
ok = test_pipe (&f->client_istream, &f->server_ostream, &f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (G_IS_OUTPUT_STREAM (f->server_ostream));
|
||||
g_assert (G_IS_INPUT_STREAM (f->client_istream));
|
||||
g_assert (ok);
|
||||
g_assert_true (G_IS_OUTPUT_STREAM (f->server_ostream));
|
||||
g_assert_true (G_IS_INPUT_STREAM (f->client_istream));
|
||||
g_assert_true (ok);
|
||||
|
||||
f->client_stream = test_io_stream_new (f->client_istream, f->client_ostream);
|
||||
f->server_stream = test_io_stream_new (f->server_istream, f->server_ostream);
|
||||
@ -244,13 +244,13 @@ flush_cb (GObject *source,
|
||||
Fixture *f = user_data;
|
||||
gboolean ok;
|
||||
|
||||
g_assert (G_IS_DBUS_CONNECTION (source));
|
||||
g_assert (G_IS_DBUS_CONNECTION (f->client_conn));
|
||||
g_assert_true (G_IS_DBUS_CONNECTION (source));
|
||||
g_assert_true (G_IS_DBUS_CONNECTION (f->client_conn));
|
||||
g_assert_cmpuint ((guintptr) f->client_conn, ==, (guintptr) G_DBUS_CONNECTION (source));
|
||||
|
||||
ok = g_dbus_connection_flush_finish (f->client_conn, res, &f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (ok);
|
||||
g_assert_true (ok);
|
||||
|
||||
f->flushed = TRUE;
|
||||
}
|
||||
@ -270,7 +270,7 @@ test_flush_busy (Fixture *f,
|
||||
"com.example.Foo", "SomeSignal", NULL,
|
||||
&f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (ok);
|
||||
g_assert_true (ok);
|
||||
|
||||
/* wait for at least part of the message to have started writing -
|
||||
* the write will block indefinitely in the worker thread
|
||||
@ -318,7 +318,7 @@ test_flush_idle (Fixture *f,
|
||||
"com.example.Foo", "SomeSignal", NULL,
|
||||
&f->error);
|
||||
g_assert_no_error (f->error);
|
||||
g_assert (ok);
|
||||
g_assert_true (ok);
|
||||
|
||||
/* wait for at least part of the message to have been written */
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user