diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-io-channel-socket.c | 5 | ||||
-rw-r--r-- | tests/test-io-channel-tls.c | 5 | ||||
-rw-r--r-- | tests/test-io-task.c | 18 |
3 files changed, 12 insertions, 16 deletions
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c index aa88c3cf45..aaa9116fb7 100644 --- a/tests/test-io-channel-socket.c +++ b/tests/test-io-channel-socket.c @@ -156,12 +156,11 @@ struct TestIOChannelData { }; -static void test_io_channel_complete(Object *src, - Error *err, +static void test_io_channel_complete(QIOTask *task, gpointer opaque) { struct TestIOChannelData *data = opaque; - data->err = err != NULL; + data->err = qio_task_propagate_error(task, NULL); g_main_loop_quit(data->loop); } diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c index bd3ae2bf7a..8eaa208e1b 100644 --- a/tests/test-io-channel-tls.c +++ b/tests/test-io-channel-tls.c @@ -53,14 +53,13 @@ struct QIOChannelTLSHandshakeData { bool failed; }; -static void test_tls_handshake_done(Object *source, - Error *err, +static void test_tls_handshake_done(QIOTask *task, gpointer opaque) { struct QIOChannelTLSHandshakeData *data = opaque; data->finished = true; - data->failed = err != NULL; + data->failed = qio_task_propagate_error(task, NULL); } diff --git a/tests/test-io-task.c b/tests/test-io-task.c index 024eb585e4..84144c9047 100644 --- a/tests/test-io-task.c +++ b/tests/test-io-task.c @@ -50,14 +50,13 @@ struct TestTaskData { }; -static void task_callback(Object *source, - Error *err, +static void task_callback(QIOTask *task, gpointer opaque) { struct TestTaskData *data = opaque; - data->source = source; - data->err = err; + data->source = qio_task_get_source(task); + qio_task_propagate_error(task, &data->err); } @@ -120,9 +119,9 @@ static void test_task_failure(void) error_setg(&err, "Some error"); - qio_task_abort(task, err); + qio_task_set_error(task, err); + qio_task_complete(task); - error_free(err); object_unref(obj); g_assert(data.source == obj); @@ -158,14 +157,13 @@ static int test_task_thread_worker(QIOTask *task, } -static void test_task_thread_callback(Object *source, - Error *err, +static void test_task_thread_callback(QIOTask *task, gpointer opaque) { struct TestThreadWorkerData *data = opaque; - data->source = source; - data->err = err; + data->source = qio_task_get_source(task); + qio_task_propagate_error(task, &data->err); data->complete = g_thread_self(); |