[evolution-data-server] test-client-view-operations.c: Add thread assertions to callbacks.



commit 5590bd4b2c44db4420e3a77c775657d3c298a352
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Mar 14 11:14:46 2013 -0400

    test-client-view-operations.c: Add thread assertions to callbacks.
    
    Make sure EBookClientView signals are emitted on the expected thread.

 .../libebook/client/test-client-view-operations.c  |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tests/libebook/client/test-client-view-operations.c 
b/tests/libebook/client/test-client-view-operations.c
index 776f3b0..fe89259 100644
--- a/tests/libebook/client/test-client-view-operations.c
+++ b/tests/libebook/client/test-client-view-operations.c
@@ -36,6 +36,8 @@ objects_added (EBookClientView *view,
 {
        const GSList *l;
 
+       g_assert (g_thread_self () == data->thread);
+
        for (l = contacts; l; l = l->next) {
                /* print_email (l->data); */
 
@@ -50,6 +52,8 @@ objects_modified (EBookClientView *view,
 {
        const GSList *l;
 
+       g_assert (g_thread_self () == data->thread);
+
        for (l = contacts; l; l = l->next) {
                /* print_email (l->data); */
        }
@@ -62,6 +66,8 @@ objects_removed (EBookClientView *view,
 {
        const GSList *l;
 
+       g_assert (g_thread_self () == data->thread);
+
        for (l = ids; l; l = l->next) {
                /* printf ("   Removed contact: %s\n", (gchar *) l->data); */
 
@@ -74,6 +80,8 @@ complete (EBookClientView *view,
           const GError *error,
           ThreadData *data)
 {
+       g_assert (g_thread_self () == data->thread);
+
        g_mutex_lock (&data->complete_mutex);
        data->complete = TRUE;
        g_cond_signal (&data->complete_cond);


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