[evolution-data-server] Further test code cleanups.



commit 0eff09b5e9a95d1faf1cb632226e1ead9ca957b3
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Oct 19 11:49:44 2012 -0400

    Further test code cleanups.

 tests/libebook/client/client-test-utils.c          |   11 +-
 tests/libebook/client/test-client-revision-view.c  |    5 +-
 tests/libebook/client/test-client-uid-only-view.c  |    5 +-
 tests/libebook/ebook-test-utils.c                  |  149 ++++++++++-------
 tests/libebook/test-ebook-add-contact.c            |    7 +-
 tests/libebook/test-ebook-commit-contact.c         |    4 +-
 tests/libebook/test-ebook-get-book-view.c          |    3 +-
 tests/libebook/test-ebook-get-contact.c            |    4 +-
 tests/libebook/test-ebook-get-required-fields.c    |    3 +-
 .../test-ebook-get-supported-auth-methods.c        |    4 +-
 tests/libebook/test-ebook-get-supported-fields.c   |    4 +-
 tests/libebook/test-ebook-remove-contact-by-id.c   |   10 +-
 tests/libebook/test-ebook-remove-contact.c         |   22 ++--
 tests/libebook/test-ebook-remove-contacts.c        |    3 +-
 tests/libebook/test-ebook-remove.c                 |    4 +-
 tests/libecal/client/test-client-revision-view.c   |   21 ++-
 tests/libecal/ecal-test-utils.c                    |  174 ++++++++++----------
 tests/libecal/test-ecal-add-timezone.c             |    8 +-
 tests/libecal/test-ecal-create-object--2.c         |   16 +-
 tests/libecal/test-ecal-get-object-list.c          |   19 ++-
 tests/libecal/test-ecal-get-query.c                |   54 ++++---
 tests/libecal/test-ecal-get-timezone.c             |    4 +-
 tests/libecal/test-ecal-modify-object.c            |   25 ++--
 tests/libecal/test-ecal-open.c                     |    8 +-
 tests/libecal/test-ecal-receive-objects.c          |    8 +-
 tests/libecal/test-ecal-send-objects.c             |    8 +-
 tests/libecal/test-ecal-set-default-timezone.c     |    8 +-
 tests/libecal/test-ecal-set-mode.c                 |   18 +-
 tests/libecal/test-ecal-stress-factory--fifo.c     |    4 +-
 .../libecal/test-ecal-stress-factory--open-async.c |   13 +-
 tests/libecal/test-ecal-stress-factory--serial.c   |    4 +-
 .../libecal/test-ecal-stress-factory--single-cal.c |    4 +-
 tests/libecal/test-ecal.c                          |   27 ++--
 tests/libedata-cal/test-cal-backend-sexp.c         |    4 +-
 tests/libedata-cal/test-intervaltree.c             |    5 +-
 tests/libedataserverui/test-name-selector.c        |    3 +-
 tests/libedataserverui/test-source-combo-box.c     |    3 +-
 tests/libedataserverui/test-source-selector.c      |    3 +-
 38 files changed, 377 insertions(+), 302 deletions(-)
---
diff --git a/tests/libebook/client/client-test-utils.c b/tests/libebook/client/client-test-utils.c
index 4fb45d7..e66c018 100644
--- a/tests/libebook/client/client-test-utils.c
+++ b/tests/libebook/client/client-test-utils.c
@@ -288,8 +288,6 @@ foreach_configured_source_async_next (gpointer *foreach_async_data,
 	return FALSE;
 }
 
-
-
 typedef struct {
 	GMainLoop       *loop;
 	const gchar     *uid;
@@ -319,7 +317,7 @@ create_book_idle (CreateBookData *data)
 	if (!data->book)
 		g_error ("Unable to create the book: %s", error->message);
 
-	g_idle_add ((GSourceFunc)quit_idle, data);
+	g_idle_add ((GSourceFunc) quit_idle, data);
 
 	return FALSE;
 }
@@ -347,7 +345,7 @@ register_source_idle (CreateBookData *data)
 	/* XXX e_source_registry_commit_source_sync isnt really sync... or else
 	 * we could call e_source_registry_ref_source() immediately
 	 */
-	g_timeout_add (20, (GSourceFunc)create_book_idle, data);
+	g_timeout_add (20, (GSourceFunc) create_book_idle, data);
 
 	return FALSE;
 }
@@ -360,7 +358,7 @@ ebook_test_utils_book_with_uid (const gchar *uid)
 	data.uid = uid;
 
 	data.loop = g_main_loop_new (NULL, FALSE);
-	g_idle_add ((GSourceFunc)register_source_idle, &data);
+	g_idle_add ((GSourceFunc) register_source_idle, &data);
 	g_main_loop_run (data.loop);
 	g_main_loop_unref (data.loop);
 
@@ -402,7 +400,8 @@ new_vcard_from_test_case (const gchar *case_name)
 	filename = g_build_filename (SRCDIR, "..", "data", "vcards", case_filename, NULL);
 	file = g_file_new_for_path (filename);
 	if (!g_file_load_contents (file, NULL, &vcard, NULL, NULL, &error)) {
-		g_warning ("failed to read test contact file '%s': %s",
+		g_warning (
+			"failed to read test contact file '%s': %s",
 				filename, error->message);
 		exit (1);
 	}
diff --git a/tests/libebook/client/test-client-revision-view.c b/tests/libebook/client/test-client-revision-view.c
index 88d8b01..5a3abba 100644
--- a/tests/libebook/client/test-client-revision-view.c
+++ b/tests/libebook/client/test-client-revision-view.c
@@ -94,8 +94,9 @@ objects_added (EBookClientView *view,
 		print_contact (contact);
 
 		if (e_contact_get_const (contact, E_CONTACT_FULL_NAME) != NULL)
-			g_error ("received contact name `%s' when only the uid and revision was requested",
-				 (gchar *) e_contact_get_const (contact, E_CONTACT_FULL_NAME));
+			g_error (
+				"received contact name `%s' when only the uid and revision was requested",
+				(gchar *) e_contact_get_const (contact, E_CONTACT_FULL_NAME));
 	}
 
 	if (!loading_view)
diff --git a/tests/libebook/client/test-client-uid-only-view.c b/tests/libebook/client/test-client-uid-only-view.c
index 8fb6851..9b3c5af 100644
--- a/tests/libebook/client/test-client-uid-only-view.c
+++ b/tests/libebook/client/test-client-uid-only-view.c
@@ -160,8 +160,9 @@ objects_added (EBookClientView *view,
 #endif
 
 		if (uids_only && e_contact_get_const (contact, E_CONTACT_FULL_NAME) != NULL)
-			g_error ("received contact name `%s' when only the uid was requested",
-				 (gchar *) e_contact_get_const (contact, E_CONTACT_FULL_NAME));
+			g_error (
+				"received contact name `%s' when only the uid was requested",
+				(gchar *) e_contact_get_const (contact, E_CONTACT_FULL_NAME));
 		else if (!uids_only && e_contact_get_const (contact, E_CONTACT_FULL_NAME) == NULL)
 			g_error ("expected contact name missing");
 	}
diff --git a/tests/libebook/ebook-test-utils.c b/tests/libebook/ebook-test-utils.c
index 23b7ae4..23bec99 100644
--- a/tests/libebook/ebook-test-utils.c
+++ b/tests/libebook/ebook-test-utils.c
@@ -51,8 +51,9 @@ ebook_test_utils_new_vcard_from_test_case (const gchar *case_name)
 	filename = g_build_filename (SRCDIR, EBOOK_TEST_UTILS_DATA_DIR, EBOOK_TEST_UTILS_VCARDS_DIR, case_filename, NULL);
 	file = g_file_new_for_path (filename);
 	if (!g_file_load_contents (file, NULL, &vcard, NULL, NULL, &error)) {
-		g_warning ("failed to read test contact file '%s': %s",
-				filename, error->message);
+		g_warning (
+			"failed to read test contact file '%s': %s",
+			filename, error->message);
 		exit (1);
 	}
 
@@ -78,11 +79,11 @@ ebook_test_utils_book_add_contact_from_test_case_verify (EBook *book,
 	uid = g_strdup (ebook_test_utils_book_add_contact (book, contact_orig));
 	contact_final = ebook_test_utils_book_get_contact (book, uid);
 
-        /* verify the contact was added "successfully" (not thorough) */
+	/* verify the contact was added "successfully" (not thorough) */
 	g_assert (ebook_test_utils_contacts_are_equal_shallow (contact_orig, contact_final));
 
 	if (contact)
-                *contact = g_object_ref (contact_final);
+		*contact = g_object_ref (contact_final);
 
 	return uid;
 }
@@ -96,8 +97,8 @@ ebook_test_utils_contacts_are_equal_shallow (EContact *a,
 {
 	const gchar *uid_a, *uid_b;
 
-        /* Avoid warnings if one or more are NULL, to make this function
-         * "NULL-friendly" */
+	/* Avoid warnings if one or more are NULL, to make this function
+	 * "NULL-friendly" */
 	if (!a && !b)
 		return TRUE;
 	if (!E_IS_CONTACT (a) || !E_IS_CONTACT (b))
@@ -121,8 +122,9 @@ ebook_test_utils_book_add_contact (EBook *book,
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to add contact to addressbook: `%s': %s",
-				name, error->message);
+		g_warning (
+			"failed to add contact to addressbook: `%s': %s",
+			name, error->message);
 		exit (1);
 	}
 
@@ -136,8 +138,9 @@ add_contact_cb (EBook *book,
                 EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously add the contact '%s': "
-				"status %d (%s)", uid, error->code, error->message);
+		g_warning (
+			"failed to asynchronously add the contact '%s': "
+			"status %d (%s)", uid, error->code, error->message);
 		exit (1);
 	}
 
@@ -182,8 +185,9 @@ ebook_test_utils_book_commit_contact (EBook *book,
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to commit changes to contact '%s' to addressbook: `%s': %s",
-				uid, name, error->message);
+		g_warning (
+			"failed to commit changes to contact '%s' to "
+			"addressbook: `%s': %s", uid, name, error->message);
 		exit (1);
 	}
 }
@@ -194,8 +198,9 @@ commit_contact_cb (EBook *book,
                    EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously commit the contact: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously commit the contact: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -238,8 +243,9 @@ ebook_test_utils_book_get_contact (EBook *book,
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to get contact '%s' in addressbook: `%s': "
-				"%s", uid, name, error->message);
+		g_warning (
+			"failed to get contact '%s' in addressbook: `%s': "
+			"%s", uid, name, error->message);
 		exit (1);
 	}
 
@@ -255,13 +261,15 @@ get_contact_cb (EBook *book,
 	const gchar *uid;
 
 	if (error) {
-		g_warning ("failed to asynchronously get the contact: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously get the contact: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
 	uid = e_contact_get_const (contact, E_CONTACT_UID);
-	test_print ("successfully asynchronously retrieved the contact '%s'\n",
+	test_print (
+		"successfully asynchronously retrieved the contact '%s'\n",
 			uid);
 
 	if (closure->cb)
@@ -301,8 +309,9 @@ ebook_test_utils_book_get_required_fields (EBook *book)
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to get required fields for addressbook "
-				"`%s': %s", name, error->message);
+		g_warning (
+			"failed to get required fields for addressbook "
+			"`%s': %s", name, error->message);
 		exit (1);
 	}
 
@@ -316,8 +325,9 @@ get_required_fields_cb (EBook *book,
                         EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously get the required fields: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously get the required fields: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -361,8 +371,9 @@ ebook_test_utils_book_get_static_capabilities (EBook *book)
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to get capabilities for addressbook: `%s': "
-				"%s", name, error->message);
+		g_warning (
+			"failed to get capabilities for addressbook: `%s': "
+			"%s", name, error->message);
 		exit (1);
 	}
 
@@ -381,8 +392,9 @@ ebook_test_utils_book_get_supported_auth_methods (EBook *book)
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to get supported auth methods for "
-				"addressbook `%s': %s", name, error->message);
+		g_warning (
+			"failed to get supported auth methods for "
+			"addressbook `%s': %s", name, error->message);
 		exit (1);
 	}
 
@@ -396,8 +408,9 @@ get_supported_auth_methods_cb (EBook *book,
                                EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously get the supported auth "
-				"methods: status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously get the supported auth "
+			"methods: status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -441,8 +454,9 @@ ebook_test_utils_book_get_supported_fields (EBook *book)
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to get supported fields for addressbook "
-				"`%s': %s", name, error->message);
+		g_warning (
+			"failed to get supported fields for addressbook "
+			"`%s': %s", name, error->message);
 		exit (1);
 	}
 
@@ -456,8 +470,9 @@ get_supported_fields_cb (EBook *book,
                         EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously get the supported fields: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously get the supported fields: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -500,8 +515,9 @@ ebook_test_utils_book_remove_contact (EBook *book,
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to remove contact '%s' from addressbook: `%s': %s",
-				uid, name, error->message);
+		g_warning (
+			"failed to remove contact '%s' from addressbook: "
+			"`%s': %s", uid, name, error->message);
 		exit (1);
 	}
 }
@@ -512,8 +528,9 @@ remove_contact_cb (EBook *book,
                    EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously remove the contact: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously remove the contact: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -539,7 +556,9 @@ ebook_test_utils_book_async_remove_contact (EBook *book,
 	if (!e_book_remove_contact_async (book, contact,
 				(EBookAsyncCallback) remove_contact_cb,
 				closure)) {
-		g_warning ("failed to set up async removeContacts (for a single contact)");
+		g_warning (
+			"failed to set up async removeContacts "
+			"(for a single contact)");
 		exit (1);
 	}
 }
@@ -550,8 +569,9 @@ remove_contact_by_id_cb (EBook *book,
                          EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously remove the contact by id: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously remove the contact by id: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -594,8 +614,9 @@ ebook_test_utils_book_remove_contacts (EBook *book,
 
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
-		g_warning ("failed to remove contacts from addressbook: `%s': %s",
-				name, error->message);
+		g_warning (
+			"failed to remove contacts from addressbook: `%s': %s",
+			name, error->message);
 		exit (1);
 	}
 }
@@ -606,8 +627,9 @@ remove_contacts_cb (EBook *book,
                     EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously remove the contacts: "
-				"status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously remove the contacts: "
+			"status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
@@ -638,15 +660,13 @@ ebook_test_utils_book_async_remove_contacts (EBook *book,
 	}
 }
 
-
-
 typedef struct {
-	GMainLoop       *loop;
-	const gchar     *uid;
+	GMainLoop *loop;
+	const gchar *uid;
 	ESourceRegistry *registry;
-	ESource         *scratch;
-	ESource         *source;
-	EBook           *book;
+	ESource *scratch;
+	ESource *source;
+	EBook *book;
 } CreateBookData;
 
 static gboolean
@@ -669,7 +689,7 @@ create_book_idle (CreateBookData *data)
 	if (!data->book)
 		g_error ("Unable to create the book: %s", error->message);
 
-	g_idle_add ((GSourceFunc)quit_idle, data);
+	g_idle_add ((GSourceFunc) quit_idle, data);
 
 	return FALSE;
 }
@@ -697,7 +717,7 @@ register_source_idle (CreateBookData *data)
 	/* XXX e_source_registry_commit_source_sync isnt really sync... or else
 	 * we could call e_source_registry_ref_source() immediately
 	 */
-	g_timeout_add (20, (GSourceFunc)create_book_idle, data);
+	g_timeout_add (20, (GSourceFunc) create_book_idle, data);
 
 	return FALSE;
 }
@@ -710,7 +730,7 @@ ebook_test_utils_book_with_uid (const gchar *uid)
 	data.uid = uid;
 
 	data.loop = g_main_loop_new (NULL, FALSE);
-	g_idle_add ((GSourceFunc)register_source_idle, &data);
+	g_idle_add ((GSourceFunc) register_source_idle, &data);
 	g_main_loop_run (data.loop);
 	g_main_loop_unref (data.loop);
 
@@ -724,9 +744,9 @@ ebook_test_utils_book_with_uid (const gchar *uid)
 EBook *
 ebook_test_utils_book_new_temp (gchar **uri)
 {
-	EBook           *book;
-	gchar           *uid;
-	guint64          real_time = g_get_real_time ();
+	EBook *book;
+	gchar *uid;
+	guint64 real_time = g_get_real_time ();
 
 	uid  = g_strdup_printf ("test-book-%" G_GINT64_FORMAT, real_time);
 	book = ebook_test_utils_book_with_uid (uid);
@@ -752,8 +772,9 @@ ebook_test_utils_book_open (EBook *book,
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
 
-		g_warning ("failed to open addressbook: `%s': %s", name,
-				error->message);
+		g_warning (
+			"failed to open addressbook: `%s': %s", name,
+			error->message);
 		exit (1);
 	}
 }
@@ -772,8 +793,9 @@ ebook_test_utils_book_get_book_view (EBook *book,
 		source = e_book_get_source (book);
 		name = e_source_get_display_name (source);
 
-		g_warning ("failed to get view for addressbook: `%s': %s",
-				name, error->message);
+		g_warning (
+			"failed to get view for addressbook: `%s': %s",
+			name, error->message);
 		exit (1);
 	}
 }
@@ -785,8 +807,9 @@ get_book_view_cb (EBook *book,
                   EBookTestClosure *closure)
 {
 	if (error) {
-		g_warning ("failed to asynchronously get book view for the "
-				"book: status %d (%s)", error->code, error->message);
+		g_warning (
+			"failed to asynchronously get book view for the "
+			"book: status %d (%s)", error->code, error->message);
 		exit (1);
 	}
 
diff --git a/tests/libebook/test-ebook-add-contact.c b/tests/libebook/test-ebook-add-contact.c
index f489380..96eaf12 100644
--- a/tests/libebook/test-ebook-add-contact.c
+++ b/tests/libebook/test-ebook-add-contact.c
@@ -27,7 +27,8 @@ main (gint argc,
 	/*
 	 * Sync version
 	 */
-	uid = ebook_test_utils_book_add_contact_from_test_case_verify (book, "simple-1", &contact_final);
+	uid = ebook_test_utils_book_add_contact_from_test_case_verify (
+		book, "simple-1", &contact_final);
 
 	test_print ("successfully added and retrieved contact '%s'\n", uid);
 	g_object_unref (contact_final);
@@ -41,8 +42,8 @@ main (gint argc,
 	contact = e_contact_new_from_vcard (vcard);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_add_contact (book, contact,
-			ebook_test_utils_callback_quit, loop);
+	ebook_test_utils_book_async_add_contact (
+		book, contact, ebook_test_utils_callback_quit, loop);
 
 	g_free (uid);
 	g_main_loop_run (loop);
diff --git a/tests/libebook/test-ebook-commit-contact.c b/tests/libebook/test-ebook-commit-contact.c
index 2c12c5c..ede5e99 100644
--- a/tests/libebook/test-ebook-commit-contact.c
+++ b/tests/libebook/test-ebook-commit-contact.c
@@ -84,8 +84,8 @@ main (gint argc,
 	verify_precommit_and_prepare_contact (contact);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_commit_contact (book, contact,
-			(GSourceFunc) commit_verify_cb, loop);
+	ebook_test_utils_book_async_commit_contact (
+		book, contact, (GSourceFunc) commit_verify_cb, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libebook/test-ebook-get-book-view.c b/tests/libebook/test-ebook-get-book-view.c
index e5ea416..4e345c5 100644
--- a/tests/libebook/test-ebook-get-book-view.c
+++ b/tests/libebook/test-ebook-get-book-view.c
@@ -123,7 +123,8 @@ main (gint argc,
 	query = e_book_query_any_field_contains ("");
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_get_book_view (book, query,
+	ebook_test_utils_book_async_get_book_view (
+		book, query,
 			(GSourceFunc) get_book_view_cb, loop);
 
 	g_main_loop_run (loop);
diff --git a/tests/libebook/test-ebook-get-contact.c b/tests/libebook/test-ebook-get-contact.c
index ba3902b..f49c2db 100644
--- a/tests/libebook/test-ebook-get-contact.c
+++ b/tests/libebook/test-ebook-get-contact.c
@@ -34,8 +34,8 @@ main (gint argc,
 	 * Async version
 	 */
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_get_contact (book, uid,
-			ebook_test_utils_callback_quit, loop);
+	ebook_test_utils_book_async_get_contact (
+		book, uid, ebook_test_utils_callback_quit, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libebook/test-ebook-get-required-fields.c b/tests/libebook/test-ebook-get-required-fields.c
index 5f6ed50..8d4ea3e 100644
--- a/tests/libebook/test-ebook-get-required-fields.c
+++ b/tests/libebook/test-ebook-get-required-fields.c
@@ -66,7 +66,8 @@ main (gint argc,
 	 * Async version
 	 */
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_get_required_fields (book,
+	ebook_test_utils_book_async_get_required_fields (
+		book,
 			(GSourceFunc) get_required_fields_cb, loop);
 
 	g_main_loop_run (loop);
diff --git a/tests/libebook/test-ebook-get-supported-auth-methods.c b/tests/libebook/test-ebook-get-supported-auth-methods.c
index 5fcef1f..262ebd0 100644
--- a/tests/libebook/test-ebook-get-supported-auth-methods.c
+++ b/tests/libebook/test-ebook-get-supported-auth-methods.c
@@ -66,8 +66,8 @@ main (gint argc,
 	 * Async version
 	 */
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_get_supported_auth_methods (book,
-			(GSourceFunc) get_supported_auth_methods_cb, loop);
+	ebook_test_utils_book_async_get_supported_auth_methods (
+		book, (GSourceFunc) get_supported_auth_methods_cb, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libebook/test-ebook-get-supported-fields.c b/tests/libebook/test-ebook-get-supported-fields.c
index 4a85f52..a5e8831 100644
--- a/tests/libebook/test-ebook-get-supported-fields.c
+++ b/tests/libebook/test-ebook-get-supported-fields.c
@@ -66,8 +66,8 @@ main (gint argc,
 	 * Async version
 	 */
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_get_supported_fields (book,
-			(GSourceFunc) get_supported_fields_cb, loop);
+	ebook_test_utils_book_async_get_supported_fields (
+		book, (GSourceFunc) get_supported_fields_cb, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libebook/test-ebook-remove-contact-by-id.c b/tests/libebook/test-ebook-remove-contact-by-id.c
index 98062d4..74b78d6 100644
--- a/tests/libebook/test-ebook-remove-contact-by-id.c
+++ b/tests/libebook/test-ebook-remove-contact-by-id.c
@@ -14,17 +14,17 @@ main (gint argc,
 
 	g_type_init ();
 
-        /*
-         * Async version
-         */
+	/*
+	 * Async version
+	 */
 	book = ebook_test_utils_book_new_temp (NULL);
 	ebook_test_utils_book_open (book, FALSE);
 
 	uid = ebook_test_utils_book_add_contact_from_test_case_verify (book, "simple-1", NULL);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_remove_contact_by_id (book, uid,
-			ebook_test_utils_callback_quit, loop);
+	ebook_test_utils_book_async_remove_contact_by_id (
+		book, uid, ebook_test_utils_callback_quit, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libebook/test-ebook-remove-contact.c b/tests/libebook/test-ebook-remove-contact.c
index 3f0f37c..a54c825 100644
--- a/tests/libebook/test-ebook-remove-contact.c
+++ b/tests/libebook/test-ebook-remove-contact.c
@@ -15,15 +15,15 @@ main (gint argc,
 
 	g_type_init ();
 
-        /*
-         * Setup
-         */
+	/*
+	 * Setup
+	 */
 	book = ebook_test_utils_book_new_temp (NULL);
 	ebook_test_utils_book_open (book, FALSE);
 
-        /*
-         * Sync version
-         */
+	/*
+	 * Sync version
+	 */
 	uid = ebook_test_utils_book_add_contact_from_test_case_verify (book, "simple-1", NULL);
 	ebook_test_utils_book_remove_contact (book, uid);
 	contact_final = NULL;
@@ -34,9 +34,9 @@ main (gint argc,
 
 	g_free (uid);
 
-        /*
-         * Async version
-         */
+	/*
+	 * Async version
+	 */
 	book = ebook_test_utils_book_new_temp (NULL);
 	ebook_test_utils_book_open (book, FALSE);
 
@@ -46,8 +46,8 @@ main (gint argc,
 
 	loop = g_main_loop_new (NULL, TRUE);
 	/* contact_final is unref'd by e_book_remove_contact() here */
-	ebook_test_utils_book_async_remove_contact (book, contact_final,
-			ebook_test_utils_callback_quit, loop);
+	ebook_test_utils_book_async_remove_contact (
+		book, contact_final, ebook_test_utils_callback_quit, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libebook/test-ebook-remove-contacts.c b/tests/libebook/test-ebook-remove-contacts.c
index c36df40..20ab401 100644
--- a/tests/libebook/test-ebook-remove-contacts.c
+++ b/tests/libebook/test-ebook-remove-contacts.c
@@ -57,7 +57,8 @@ main (gint argc,
 	uids = g_list_prepend (uids, uid_2);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_remove_contacts (book, uids,
+	ebook_test_utils_book_async_remove_contacts (
+		book, uids,
 			ebook_test_utils_callback_quit, loop);
 
 	g_main_loop_run (loop);
diff --git a/tests/libebook/test-ebook-remove.c b/tests/libebook/test-ebook-remove.c
index f85b517..bd23d57 100644
--- a/tests/libebook/test-ebook-remove.c
+++ b/tests/libebook/test-ebook-remove.c
@@ -25,8 +25,8 @@ main (gint argc,
 	ebook_test_utils_book_open (book, FALSE);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ebook_test_utils_book_async_remove (book,
-			ebook_test_utils_callback_quit, loop);
+	ebook_test_utils_book_async_remove (
+		book, ebook_test_utils_callback_quit, loop);
 
 	g_main_loop_run (loop);
 #endif
diff --git a/tests/libecal/client/test-client-revision-view.c b/tests/libecal/client/test-client-revision-view.c
index bf60e78..50a443a 100644
--- a/tests/libecal/client/test-client-revision-view.c
+++ b/tests/libecal/client/test-client-revision-view.c
@@ -58,10 +58,11 @@ objects_added_cb (GObject *object,
 		struct icaltimetype recurrence    = icalcomponent_get_recurrenceid (component);
 		struct icaltimetype last_modified = get_last_modified (component);
 
-		g_print ("Object added %s (recurrence id:%s, last-modified:%s)\n",
-			 icalcomponent_get_uid (component),
-			 icaltime_as_ical_string (recurrence),
-			 icaltime_as_ical_string (last_modified));
+		g_print (
+			"Object added %s (recurrence id:%s, last-modified:%s)\n",
+			icalcomponent_get_uid (component),
+			icaltime_as_ical_string (recurrence),
+			icaltime_as_ical_string (last_modified));
 
 		g_assert (icalcomponent_get_summary (component) == NULL);
 	}
@@ -81,10 +82,11 @@ objects_modified_cb (GObject *object,
 		struct icaltimetype recurrence    = icalcomponent_get_recurrenceid (component);
 		struct icaltimetype last_modified = get_last_modified (component);
 
-		g_print ("Object modified %s (recurrence id:%s, last-modified:%s)\n",
-			 icalcomponent_get_uid (component),
-			 icaltime_as_ical_string (recurrence),
-			 icaltime_as_ical_string (last_modified));
+		g_print (
+			"Object modified %s (recurrence id:%s, last-modified:%s)\n",
+			icalcomponent_get_uid (component),
+			icaltime_as_ical_string (recurrence),
+			icaltime_as_ical_string (last_modified));
 
 		g_assert (icalcomponent_get_summary (component) == NULL);
 	}
@@ -143,7 +145,8 @@ alter_cal_client (gpointer user_data)
 	}
 
 	icalcomponent_set_uid (icalcomp, uid);
-	icalcomponent_set_recurrenceid (icalcomp,
+	icalcomponent_set_recurrenceid (
+		icalcomp,
 					icaltime_from_timet (icaltime_as_timet (now) + 60 * 60 * 60, 0));
 	icalcomponent_set_summary (icalcomp, "Modified event summary");
 
diff --git a/tests/libecal/ecal-test-utils.c b/tests/libecal/ecal-test-utils.c
index 8cb2a5f..edbf267 100644
--- a/tests/libecal/ecal-test-utils.c
+++ b/tests/libecal/ecal-test-utils.c
@@ -57,8 +57,9 @@ ecal_test_utils_cal_new_temp (gchar **uri,
 	gchar *file_template;
 	gchar *uri_result;
 
-	file_template = g_build_filename (g_get_tmp_dir (),
-			"ecal-test-XXXXXX/", NULL);
+	file_template = g_build_filename (
+		g_get_tmp_dir (),
+		"ecal-test-XXXXXX/", NULL);
 	g_mkstemp (file_template);
 
 	uri_result = g_strconcat ("local:", file_template, NULL);
@@ -92,8 +93,9 @@ ecal_test_utils_cal_open (ECal *cal,
 		source = e_cal_get_source (cal);
 		uid = e_source_get_uid (source);
 
-		g_warning ("failed to open calendar: `%s': %s", uid,
-				error->message);
+		g_warning (
+			"failed to open calendar: `%s': %s",
+			uid, error->message);
 		exit (1);
 	}
 }
@@ -195,78 +197,79 @@ void
 ecal_test_utils_cal_get_capabilities (ECal *cal)
 {
 	test_print ("calendar capabilities:\n");
-	test_print ("        One alarm only:                  %s\n"
-		 "        Organizers must attend meetings: %s\n"
-		 "        Organizers must accept meetings: %s\n"
-		 "        Master object for recurrences:   %s\n"
-		 "        Can save schedules:              %s\n"
-		 "        No alarm repeat:                 %s\n"
-		 "        No audio alarms:                 %s\n"
-		 "        No display alarms:               %s\n"
-		 "        No email alarms:                 %s\n"
-		 "        No procedure alarms:             %s\n"
-		 "        No task assignment:              %s\n"
-		 "        No 'this and future':            %s\n"
-		 "        No 'this and prior':             %s\n"
-		 "        No transparency:                 %s\n"
-		 "        Organizer not email address:     %s\n"
-		 "        Remove alarms:                   %s\n"
-		 "        Create messages:                 %s\n"
-		 "        No conv. to assigned task:       %s\n"
-		 "        No conv. to recurring:           %s\n"
-		 "        No general options:              %s\n"
-		 "        Requires send options:           %s\n"
-		 "        Delegate supported:              %s\n"
-		 "        No organizer required:           %s\n"
-		 "        Delegate to many:                %s\n"
-		 "        Has unaccepted meeting:          %s\n"
-		 ,
-		 b2s (e_cal_get_one_alarm_only (cal)),
-		 b2s (e_cal_get_organizer_must_attend (cal)),
-		 b2s (e_cal_get_organizer_must_accept (cal)),
-		 b2s (e_cal_get_recurrences_no_master (cal)),
-		 b2s (e_cal_get_save_schedules (cal)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_THISANDFUTURE)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_THISANDPRIOR)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_TRANSPARENCY)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_REMOVE_ALARMS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_CREATE_MESSAGES)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_NO_ORGANIZER)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)),
-		 b2s (e_cal_get_static_capability (cal,
-				 CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING))
-		 );
+	test_print (
+		"        One alarm only:                  %s\n"
+		"        Organizers must attend meetings: %s\n"
+		"        Organizers must accept meetings: %s\n"
+		"        Master object for recurrences:   %s\n"
+		"        Can save schedules:              %s\n"
+		"        No alarm repeat:                 %s\n"
+		"        No audio alarms:                 %s\n"
+		"        No display alarms:               %s\n"
+		"        No email alarms:                 %s\n"
+		"        No procedure alarms:             %s\n"
+		"        No task assignment:              %s\n"
+		"        No 'this and future':            %s\n"
+		"        No 'this and prior':             %s\n"
+		"        No transparency:                 %s\n"
+		"        Organizer not email address:     %s\n"
+		"        Remove alarms:                   %s\n"
+		"        Create messages:                 %s\n"
+		"        No conv. to assigned task:       %s\n"
+		"        No conv. to recurring:           %s\n"
+		"        No general options:              %s\n"
+		"        Requires send options:           %s\n"
+		"        Delegate supported:              %s\n"
+		"        No organizer required:           %s\n"
+		"        Delegate to many:                %s\n"
+		"        Has unaccepted meeting:          %s\n"
+		,
+		b2s (e_cal_get_one_alarm_only (cal)),
+		b2s (e_cal_get_organizer_must_attend (cal)),
+		b2s (e_cal_get_organizer_must_accept (cal)),
+		b2s (e_cal_get_recurrences_no_master (cal)),
+		b2s (e_cal_get_save_schedules (cal)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_THISANDFUTURE)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_THISANDPRIOR)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_TRANSPARENCY)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_REMOVE_ALARMS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_CREATE_MESSAGES)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_NO_ORGANIZER)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)),
+		b2s (e_cal_get_static_capability (cal,
+		CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING))
+		);
 }
 
 void
@@ -287,10 +290,11 @@ ecal_test_utils_cal_assert_objects_equal_shallow (icalcomponent *a,
 	uid_a = icalcomponent_get_uid (a);
 	uid_b = icalcomponent_get_uid (b);
 	if (g_strcmp0 (uid_a, uid_b)) {
-		g_error ("icomponents not equal:\n"
-			 "        uid A: '%s'\n"
-			 "        uid b: '%s'\n",
-			 uid_a, uid_b);
+		g_error (
+			"icomponents not equal:\n"
+			"        uid A: '%s'\n"
+			"        uid b: '%s'\n",
+			uid_a, uid_b);
 	}
 }
 
@@ -436,8 +440,9 @@ ecal_test_utils_cal_create_object (ECal *cal,
 	}
 
 	ical_string = icalcomponent_as_ical_string (component);
-	test_print ("successfully created icalcomponent object '%s'\n%s\n", uid,
-			ical_string);
+	test_print (
+		"successfully created icalcomponent object '%s'\n%s\n", uid,
+		ical_string);
 	g_free (ical_string);
 
 	return uid;
@@ -660,8 +665,9 @@ ecal_test_utils_get_query (ECal *cal,
 	ECalView *query = NULL;
 
 	if (!e_cal_get_query (cal, sexp, &query, &error)) {
-		g_error (G_STRLOC ": Unable to obtain calendar view: %s\n",
-				error->message);
+		g_error (
+			G_STRLOC ": Unable to obtain calendar view: %s\n",
+			error->message);
 	}
 	test_print ("successfully retrieved calendar view for query '%s'", sexp);
 
diff --git a/tests/libecal/test-ecal-add-timezone.c b/tests/libecal/test-ecal-add-timezone.c
index 42f7181..9533466 100644
--- a/tests/libecal/test-ecal-add-timezone.c
+++ b/tests/libecal/test-ecal-add-timezone.c
@@ -39,9 +39,13 @@ main (gint argc,
 
 	/* verify */
 	zone_final = ecal_test_utils_cal_get_timezone (cal, TZID_NEW);
-	g_assert (!g_strcmp0 (icaltimezone_get_tzid (zone),
+	g_assert (
+		!g_strcmp0 (
+			icaltimezone_get_tzid (zone),
 			icaltimezone_get_tzid (zone_final)));
-	g_assert (!g_strcmp0 (icaltimezone_get_tznames (zone),
+	g_assert (
+		!g_strcmp0 (
+			icaltimezone_get_tznames (zone),
 			icaltimezone_get_tznames (zone_final)));
 
 	icaltimezone_free (zone, TRUE);
diff --git a/tests/libecal/test-ecal-create-object--2.c b/tests/libecal/test-ecal-create-object--2.c
index 7ee7fb2..4780853 100644
--- a/tests/libecal/test-ecal-create-object--2.c
+++ b/tests/libecal/test-ecal-create-object--2.c
@@ -22,16 +22,18 @@ main (gint argc,
 
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
 	ecal_test_utils_cal_open (cal, FALSE);
-	ecal_test_utils_create_component (cal, "20040109T090000Z", "UTC",
-			"20040109T103000", "UTC", EVENT_SUMMARY, &e_component,
-			&uid);
+	ecal_test_utils_create_component (
+		cal,
+		"20040109T090000Z", "UTC",
+		"20040109T103000", "UTC",
+		EVENT_SUMMARY, &e_component, &uid);
 
 	icalcomponent_final = ecal_test_utils_cal_get_object (cal, uid);
 	e_component_final = e_cal_component_new ();
-	ecal_test_utils_cal_component_set_icalcomponent (e_component_final,
-				icalcomponent_final);
-	ecal_test_utils_cal_assert_e_cal_components_equal (e_component,
-			e_component_final);
+	ecal_test_utils_cal_component_set_icalcomponent (
+		e_component_final, icalcomponent_final);
+	ecal_test_utils_cal_assert_e_cal_components_equal (
+		e_component, e_component_final);
 
 	g_object_unref (e_component_final);
 	g_object_unref (e_component);
diff --git a/tests/libecal/test-ecal-get-object-list.c b/tests/libecal/test-ecal-get-object-list.c
index 40063a1..fa0bc8a 100644
--- a/tests/libecal/test-ecal-get-object-list.c
+++ b/tests/libecal/test-ecal-get-object-list.c
@@ -25,22 +25,25 @@ main (gint argc,
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
 	ecal_test_utils_cal_open (cal, FALSE);
 
-	ecal_test_utils_create_component (cal, "20040109T090000Z", "UTC",
-			"20040109T103000", "UTC", EVENT_SUMMARY, &e_component,
-			&uid);
+	ecal_test_utils_create_component (
+		cal,
+		"20040109T090000Z", "UTC",
+		"20040109T103000", "UTC",
+		EVENT_SUMMARY, &e_component, &uid);
 	component = e_cal_component_get_icalcomponent (e_component);
 
 	component_final = ecal_test_utils_cal_get_object (cal, uid);
-	ecal_test_utils_cal_assert_objects_equal_shallow (component,
+	ecal_test_utils_cal_assert_objects_equal_shallow (
+		component,
 			component_final);
 	icalcomponent_free (component_final);
 
-	components = ecal_test_utils_cal_get_object_list (cal,
-			"(contains? \"summary\" \"" EVENT_SUMMARY "\")");
+	components = ecal_test_utils_cal_get_object_list (
+		cal, "(contains? \"summary\" \"" EVENT_SUMMARY "\")");
 	g_assert (g_list_length (components) == 1);
 	component_final = components->data;
-	ecal_test_utils_cal_assert_objects_equal_shallow (component,
-			component_final);
+	ecal_test_utils_cal_assert_objects_equal_shallow (
+		component, component_final);
 
 	e_cal_free_object_list (components);
 	g_free (uid);
diff --git a/tests/libecal/test-ecal-get-query.c b/tests/libecal/test-ecal-get-query.c
index a056855..611d22b 100644
--- a/tests/libecal/test-ecal-get-query.c
+++ b/tests/libecal/test-ecal-get-query.c
@@ -77,8 +77,9 @@ objects_removed_cb (GObject *object,
 	for (l = objects; l; l = l->next) {
 		ECalComponentId *id = l->data;
 
-		test_print ("Object removed: uid: %s, rid: %s\n", id->uid,
-				id->rid);
+		test_print (
+			"Object removed: uid: %s, rid: %s\n",
+			id->uid, id->rid);
 	}
 
 	subtest_passed (SUBTEST_OBJECTS_REMOVED);
@@ -114,32 +115,33 @@ alter_cal_cb (ECal *cal)
 	gchar *uid;
 
 	/* create a calendar object */
-	ecal_test_utils_create_component (cal, INITIAL_BEGIN_TIME,
-			INITIAL_BEGIN_TIMEZONE, INITIAL_END_TIME,
-			INITIAL_END_TIMEZONE, EVENT_SUMMARY, &e_component,
-			&uid);
+	ecal_test_utils_create_component (
+		cal,
+		INITIAL_BEGIN_TIME, INITIAL_BEGIN_TIMEZONE,
+		INITIAL_END_TIME, INITIAL_END_TIMEZONE,
+		EVENT_SUMMARY, &e_component, &uid);
 	component = e_cal_component_get_icalcomponent (e_component);
 
 	component_final = ecal_test_utils_cal_get_object (cal, uid);
-	ecal_test_utils_cal_assert_objects_equal_shallow (component,
-			component_final);
+	ecal_test_utils_cal_assert_objects_equal_shallow (
+		component, component_final);
 	icalcomponent_free (component_final);
 
 	/* make and commit changes to the object */
 	icaltime = icaltime_from_string (FINAL_BEGIN_TIME);
 	icalcomponent_set_dtstart (component, icaltime);
-	ecal_test_utils_cal_component_set_icalcomponent (e_component,
-			component);
+	ecal_test_utils_cal_component_set_icalcomponent (
+		e_component, component);
 	ecal_test_utils_cal_modify_object (cal, component, CALOBJ_MOD_ALL);
 
 	/* verify the modification */
 	component_final = ecal_test_utils_cal_get_object (cal, uid);
 	e_component_final = e_cal_component_new ();
-	ecal_test_utils_cal_component_set_icalcomponent (e_component_final,
-				component_final);
+	ecal_test_utils_cal_component_set_icalcomponent (
+		e_component_final, component_final);
 
-	ecal_test_utils_cal_assert_e_cal_components_equal (e_component,
-			e_component_final);
+	ecal_test_utils_cal_assert_e_cal_components_equal (
+		e_component, e_component_final);
 
 	/* remove the object */
 	ecal_test_utils_cal_remove_object (cal, uid);
@@ -167,21 +169,25 @@ main (gint argc,
 	view = ecal_test_utils_get_query (cal, "(contains? \"any\" \"event\")");
 
 	/* monitor changes to the calendar */
-	g_signal_connect (G_OBJECT (view), "objects_added",
-			G_CALLBACK (objects_added_cb), cal);
-	g_signal_connect (G_OBJECT (view), "objects_modified",
-			G_CALLBACK (objects_modified_cb), cal);
-	g_signal_connect (G_OBJECT (view), "objects_removed",
-			G_CALLBACK (objects_removed_cb), cal);
-	g_signal_connect (G_OBJECT (view), "view_complete",
-			G_CALLBACK (view_complete_cb), cal);
+	g_signal_connect (
+		view, "objects_added",
+		G_CALLBACK (objects_added_cb), cal);
+	g_signal_connect (
+		view, "objects_modified",
+		G_CALLBACK (objects_modified_cb), cal);
+	g_signal_connect (
+		view, "objects_removed",
+		G_CALLBACK (objects_removed_cb), cal);
+	g_signal_connect (
+		view, "view_complete",
+		G_CALLBACK (view_complete_cb), cal);
 
 	e_cal_view_start (view);
 
 	loop = g_main_loop_new (NULL, TRUE);
 	alter_cal_id = g_idle_add ((GSourceFunc) alter_cal_cb, cal);
-	complete_timeout_id = g_timeout_add_seconds (COMPLETE_TIMEOUT,
-			(GSourceFunc) complete_timeout_cb, cal);
+	complete_timeout_id = g_timeout_add_seconds (
+		COMPLETE_TIMEOUT, (GSourceFunc) complete_timeout_cb, cal);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libecal/test-ecal-get-timezone.c b/tests/libecal/test-ecal-get-timezone.c
index b8ed566..8f30409 100644
--- a/tests/libecal/test-ecal-get-timezone.c
+++ b/tests/libecal/test-ecal-get-timezone.c
@@ -23,7 +23,9 @@ main (gint argc,
 	zone = ecal_test_utils_cal_get_timezone (cal, "UTC");
 	utc_zone = icaltimezone_get_utc_timezone ();
 
-	g_assert (!g_strcmp0 (icaltimezone_get_tzid (zone),
+	g_assert (
+		!g_strcmp0 (
+			icaltimezone_get_tzid (zone),
 			icaltimezone_get_tzid (utc_zone)));
 
 	return 0;
diff --git a/tests/libecal/test-ecal-modify-object.c b/tests/libecal/test-ecal-modify-object.c
index 9ef77ce..979b140 100644
--- a/tests/libecal/test-ecal-modify-object.c
+++ b/tests/libecal/test-ecal-modify-object.c
@@ -32,32 +32,33 @@ main (gint argc,
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
 	ecal_test_utils_cal_open (cal, FALSE);
 
-	ecal_test_utils_create_component (cal, INITIAL_BEGIN_TIME,
-			INITIAL_BEGIN_TIMEZONE, INITIAL_END_TIME,
-			INITIAL_END_TIMEZONE, EVENT_SUMMARY, &e_component,
-			&uid);
+	ecal_test_utils_create_component (
+		cal,
+		INITIAL_BEGIN_TIME, INITIAL_BEGIN_TIMEZONE,
+		INITIAL_END_TIME, INITIAL_END_TIMEZONE,
+		EVENT_SUMMARY, &e_component, &uid);
 	component = e_cal_component_get_icalcomponent (e_component);
 
 	component_final = ecal_test_utils_cal_get_object (cal, uid);
-	ecal_test_utils_cal_assert_objects_equal_shallow (component,
-			component_final);
+	ecal_test_utils_cal_assert_objects_equal_shallow (
+		component, component_final);
 	icalcomponent_free (component_final);
 
 	/* make and commit changes */
 	icaltime = icaltime_from_string (FINAL_BEGIN_TIME);
 	icalcomponent_set_dtstart (component, icaltime);
-	ecal_test_utils_cal_component_set_icalcomponent (e_component,
-			component);
+	ecal_test_utils_cal_component_set_icalcomponent (
+		e_component, component);
 	ecal_test_utils_cal_modify_object (cal, component, CALOBJ_MOD_ALL);
 
 	/* verify */
 	component_final = ecal_test_utils_cal_get_object (cal, uid);
 	e_component_final = e_cal_component_new ();
-	ecal_test_utils_cal_component_set_icalcomponent (e_component_final,
-				component_final);
+	ecal_test_utils_cal_component_set_icalcomponent (
+		e_component_final, component_final);
 
-	ecal_test_utils_cal_assert_e_cal_components_equal (e_component,
-			e_component_final);
+	ecal_test_utils_cal_assert_e_cal_components_equal (
+		e_component, e_component_final);
 
 	g_object_unref (e_component_final);
 	g_free (uid);
diff --git a/tests/libecal/test-ecal-open.c b/tests/libecal/test-ecal-open.c
index ad31b97..05b5b1a 100644
--- a/tests/libecal/test-ecal-open.c
+++ b/tests/libecal/test-ecal-open.c
@@ -43,12 +43,12 @@ main (gint argc,
 
 	/* Async version */
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
-	open_timeout_id = g_timeout_add_seconds (OPEN_ASYNC_TIMEOUT,
-			(GSourceFunc) open_timeout_cb, cal);
+	open_timeout_id = g_timeout_add_seconds (
+		OPEN_ASYNC_TIMEOUT, (GSourceFunc) open_timeout_cb, cal);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ecal_test_utils_cal_async_open (cal, FALSE,
-			(GSourceFunc) open_complete_cb, loop);
+	ecal_test_utils_cal_async_open (
+		cal, FALSE, (GSourceFunc) open_complete_cb, loop);
 	g_main_loop_run (loop);
 
 	return 0;
diff --git a/tests/libecal/test-ecal-receive-objects.c b/tests/libecal/test-ecal-receive-objects.c
index 18cc2dd..8e1784e 100644
--- a/tests/libecal/test-ecal-receive-objects.c
+++ b/tests/libecal/test-ecal-receive-objects.c
@@ -21,9 +21,11 @@ main (gint argc,
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
 	ecal_test_utils_cal_open (cal, FALSE);
 
-	ecal_test_utils_create_component (cal, "20040109T090000Z", "UTC",
-			"20040109T103000", "UTC", "meeting request",
-			&e_component, &uid);
+	ecal_test_utils_create_component (
+		cal,
+		"20040109T090000Z", "UTC",
+		"20040109T103000", "UTC",
+		"meeting request", &e_component, &uid);
 
 	component = e_cal_component_get_icalcomponent (e_component);
 	ecal_test_utils_cal_receive_objects (cal, component);
diff --git a/tests/libecal/test-ecal-send-objects.c b/tests/libecal/test-ecal-send-objects.c
index 9ed6a9e..5cdb1ca 100644
--- a/tests/libecal/test-ecal-send-objects.c
+++ b/tests/libecal/test-ecal-send-objects.c
@@ -23,9 +23,11 @@ main (gint argc,
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
 	ecal_test_utils_cal_open (cal, FALSE);
 
-	ecal_test_utils_create_component (cal, "20040109T090000Z", "UTC",
-			"20040109T103000", "UTC", "new event", &e_component,
-			&uid);
+	ecal_test_utils_create_component (
+		cal,
+		"20040109T090000Z", "UTC",
+		"20040109T103000", "UTC",
+		"new event", &e_component, &uid);
 
 	component = e_cal_component_get_icalcomponent (e_component);
 	ecal_test_utils_cal_send_objects (cal, component, &users, &modified_component);
diff --git a/tests/libecal/test-ecal-set-default-timezone.c b/tests/libecal/test-ecal-set-default-timezone.c
index 553e6d5..14cbca9 100644
--- a/tests/libecal/test-ecal-set-default-timezone.c
+++ b/tests/libecal/test-ecal-set-default-timezone.c
@@ -43,9 +43,13 @@ main (gint argc,
 	/* FIXME: enhance the validation; confirm that the timezone was actually
 	 * set as the default */
 	zone_final = ecal_test_utils_cal_get_timezone (cal, TZID_NEW);
-	g_assert (!g_strcmp0 (icaltimezone_get_tzid (zone),
+	g_assert (
+		!g_strcmp0 (
+			icaltimezone_get_tzid (zone),
 			icaltimezone_get_tzid (zone_final)));
-	g_assert (!g_strcmp0 (icaltimezone_get_tznames (zone),
+	g_assert (
+		!g_strcmp0 (
+			icaltimezone_get_tznames (zone),
 			icaltimezone_get_tznames (zone_final)));
 
 	icaltimezone_free (zone, TRUE);
diff --git a/tests/libecal/test-ecal-set-mode.c b/tests/libecal/test-ecal-set-mode.c
index 0929005..b7d6d4b 100644
--- a/tests/libecal/test-ecal-set-mode.c
+++ b/tests/libecal/test-ecal-set-mode.c
@@ -18,8 +18,9 @@ cal_set_mode_cb (ECalTestClosure *closure)
 	g_source_remove (cal_set_mode_timeout_id);
 
 	if (closure->mode != MODE_FINAL) {
-		g_warning ("set mode to %d, but we expected %d", closure->mode,
-				MODE_FINAL);
+		g_warning (
+			"set mode to %d, but we expected %d",
+			closure->mode, MODE_FINAL);
 	}
 
 	g_main_loop_quit ((GMainLoop *) closure->user_data);
@@ -28,8 +29,9 @@ cal_set_mode_cb (ECalTestClosure *closure)
 static void
 cal_set_mode_timeout_cb (gpointer user_data)
 {
-	g_warning ("failed to get a confirmation for the new calendar mode we "
-			"set (within a reasonable time frame)");
+	g_warning (
+		"failed to get a confirmation for the new calendar mode we "
+		"set (within a reasonable time frame)");
 	exit (1);
 }
 
@@ -46,12 +48,12 @@ main (gint argc,
 	cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
 	ecal_test_utils_cal_open (cal, FALSE);
 
-	cal_set_mode_timeout_id = g_timeout_add_seconds (SET_MODE_TIMEOUT,
-			(GSourceFunc) cal_set_mode_timeout_cb, cal);
+	cal_set_mode_timeout_id = g_timeout_add_seconds (
+		SET_MODE_TIMEOUT, (GSourceFunc) cal_set_mode_timeout_cb, cal);
 
 	loop = g_main_loop_new (NULL, TRUE);
-	ecal_test_utils_cal_set_mode (cal, MODE_FINAL,
-			(GSourceFunc) cal_set_mode_cb, loop);
+	ecal_test_utils_cal_set_mode (
+		cal, MODE_FINAL, (GSourceFunc) cal_set_mode_cb, loop);
 
 	g_main_loop_run (loop);
 
diff --git a/tests/libecal/test-ecal-stress-factory--fifo.c b/tests/libecal/test-ecal-stress-factory--fifo.c
index 6025cf5..1979949 100644
--- a/tests/libecal/test-ecal-stress-factory--fifo.c
+++ b/tests/libecal/test-ecal-stress-factory--fifo.c
@@ -20,8 +20,8 @@ main (gint argc,
 	/* Create and open many calendars; then remove each of them */
 
 	for (i = 0; i < NUM_CALS; i++) {
-		cals[i] = ecal_test_utils_cal_new_temp (&uri,
-				E_CAL_SOURCE_TYPE_EVENT);
+		cals[i] = ecal_test_utils_cal_new_temp (
+			&uri, E_CAL_SOURCE_TYPE_EVENT);
 		ecal_test_utils_cal_open (cals[i], FALSE);
 
 		g_free (uri);
diff --git a/tests/libecal/test-ecal-stress-factory--open-async.c b/tests/libecal/test-ecal-stress-factory--open-async.c
index 5569470..0258efc 100644
--- a/tests/libecal/test-ecal-stress-factory--open-async.c
+++ b/tests/libecal/test-ecal-stress-factory--open-async.c
@@ -44,17 +44,18 @@ main (gint argc,
 
 	g_type_init ();
 
-	open_timeout_id = g_timeout_add_seconds (OPEN_ASYNC_TIMEOUT,
-			(GSourceFunc) open_timeout_cb, NULL);
+	open_timeout_id = g_timeout_add_seconds (
+		OPEN_ASYNC_TIMEOUT, (GSourceFunc) open_timeout_cb, NULL);
 
 	loop = g_main_loop_new (NULL, TRUE);
 
         /* open and close many calendars in parallel */
 	for (i = 0; i < NUM_CALS; i++) {
-		cals[i] = ecal_test_utils_cal_new_temp (&uri,
-				E_CAL_SOURCE_TYPE_EVENT);
-		ecal_test_utils_cal_async_open (cals[i], FALSE,
-				(GSourceFunc) open_complete_cb, loop);
+		cals[i] = ecal_test_utils_cal_new_temp (
+			&uri, E_CAL_SOURCE_TYPE_EVENT);
+		ecal_test_utils_cal_async_open (
+			cals[i], FALSE,
+			(GSourceFunc) open_complete_cb, loop);
 
 		g_free (uri);
 	}
diff --git a/tests/libecal/test-ecal-stress-factory--serial.c b/tests/libecal/test-ecal-stress-factory--serial.c
index e7f9d70..b61bd7b 100644
--- a/tests/libecal/test-ecal-stress-factory--serial.c
+++ b/tests/libecal/test-ecal-stress-factory--serial.c
@@ -20,8 +20,8 @@ main (gint argc,
 	for (i = 0; i < NUM_CALS; i++) {
 		ECal *cal;
 
-		cal = ecal_test_utils_cal_new_temp (&uri,
-				E_CAL_SOURCE_TYPE_EVENT);
+		cal = ecal_test_utils_cal_new_temp (
+			&uri, E_CAL_SOURCE_TYPE_EVENT);
 		ecal_test_utils_cal_open (cal, FALSE);
 
 		g_free (uri);
diff --git a/tests/libecal/test-ecal-stress-factory--single-cal.c b/tests/libecal/test-ecal-stress-factory--single-cal.c
index 30c53be..82ae90b 100644
--- a/tests/libecal/test-ecal-stress-factory--single-cal.c
+++ b/tests/libecal/test-ecal-stress-factory--single-cal.c
@@ -25,8 +25,8 @@ main (gint argc,
 #if 0
 	/* open and close the same calendar repeatedly */
 	for (i = 0; i < NUM_OPENS - 1; i++) {
-		cal = ecal_test_utils_cal_new_from_uri (uri,
-				E_CAL_SOURCE_TYPE_EVENT);
+		cal = ecal_test_utils_cal_new_from_uri (
+			uri, E_CAL_SOURCE_TYPE_EVENT);
 		ecal_test_utils_cal_open (cal, FALSE);
 		g_object_unref (cal);
 	}
diff --git a/tests/libecal/test-ecal.c b/tests/libecal/test-ecal.c
index ba0711f..854f23d 100644
--- a/tests/libecal/test-ecal.c
+++ b/tests/libecal/test-ecal.c
@@ -335,9 +335,10 @@ static const gchar *
 test_cal_loaded (ECal *client)
 {
 	/* Test one loaded calendar and another that is not loaded. */
-	mu_assert ("Test get_cal_load_state : Failed \n",
-			(E_CAL_LOAD_LOADED == e_cal_get_load_state (client)) &&
-			(E_CAL_LOAD_NOT_LOADED == e_cal_get_load_state (NULL)));
+	mu_assert (
+		"Test get_cal_load_state : Failed \n",
+		(E_CAL_LOAD_LOADED == e_cal_get_load_state (client)) &&
+		(E_CAL_LOAD_NOT_LOADED == e_cal_get_load_state (NULL)));
 
 	return NULL;
 }
@@ -705,14 +706,18 @@ create_client (ECal **client,
 		exit (1);
 	}
 
-	g_signal_connect (G_OBJECT (query), "objects_added",
-			  G_CALLBACK (objects_added_cb), client);
-	g_signal_connect (G_OBJECT (query), "objects_modified",
-			  G_CALLBACK (objects_modified_cb), client);
-	g_signal_connect (G_OBJECT (query), "objects_removed",
-			  G_CALLBACK (objects_removed_cb), client);
-	g_signal_connect (G_OBJECT (query), "view_complete",
-			  G_CALLBACK (view_complete_cb), client);
+	g_signal_connect (
+		G_OBJECT (query), "objects_added",
+		G_CALLBACK (objects_added_cb), client);
+	g_signal_connect (
+		G_OBJECT (query), "objects_modified",
+		G_CALLBACK (objects_modified_cb), client);
+	g_signal_connect (
+		G_OBJECT (query), "objects_removed",
+		G_CALLBACK (objects_removed_cb), client);
+	g_signal_connect (
+		G_OBJECT (query), "view_complete",
+		G_CALLBACK (view_complete_cb), client);
 
 	e_cal_view_start (query);
 
diff --git a/tests/libedata-cal/test-cal-backend-sexp.c b/tests/libedata-cal/test-cal-backend-sexp.c
index 3370a73..4641d1f 100644
--- a/tests/libedata-cal/test-cal-backend-sexp.c
+++ b/tests/libedata-cal/test-cal-backend-sexp.c
@@ -35,10 +35,10 @@ gint main (gint argc, gchar **argv)
 		test_query ("(or (occur-in-time-range? (make-time \"20080727T220000Z\") (make-time \"20080907T220000Z\")) (contains? \"substring\"))");
 
 		test_query ("(and (and (occur-in-time-range? (make-time \"20080727T220000Z\") (make-time \"20080907T220000Z\"))"
-			    " (or (contains? \"substring\") (has-categories? \"blah\"))) (has-alarms?))");
+			" (or (contains? \"substring\") (has-categories? \"blah\"))) (has-alarms?))");
 
 		test_query ("(or (and (occur-in-time-range? (make-time \"20080727T220000Z\") (make-time \"20080907T220000Z\"))"
-			    " (or (contains? \"substring\") (has-categories? \"blah\"))) (has-alarms?))");
+			" (or (contains? \"substring\") (has-categories? \"blah\"))) (has-alarms?))");
 	}
 	else
 		test_query (argv[1]);
diff --git a/tests/libedata-cal/test-intervaltree.c b/tests/libedata-cal/test-intervaltree.c
index f972315..4efbe1e 100644
--- a/tests/libedata-cal/test-intervaltree.c
+++ b/tests/libedata-cal/test-intervaltree.c
@@ -365,8 +365,9 @@ random_test (void)
 			{
 				g_free (rid);
 				e_intervaltree_dump (tree);
-				g_print ("Deleting interval %d - %d ERROR\n", interval->start,
-					 interval->end);
+				g_print (
+					"Deleting interval %d - %d ERROR\n", interval->start,
+					interval->end);
 				exit (-1);
 			}
 
diff --git a/tests/libedataserverui/test-name-selector.c b/tests/libedataserverui/test-name-selector.c
index 6f3f442..c566471 100644
--- a/tests/libedataserverui/test-name-selector.c
+++ b/tests/libedataserverui/test-name-selector.c
@@ -88,7 +88,8 @@ main (gint argc,
 	registry = e_source_registry_new_sync (NULL, &error);
 
 	if (error != NULL) {
-		g_error ("Failed to load ESource registry: %s",
+		g_error (
+			"Failed to load ESource registry: %s",
 			error->message);
 		g_assert_not_reached ();
 	}
diff --git a/tests/libedataserverui/test-source-combo-box.c b/tests/libedataserverui/test-source-combo-box.c
index cbebd63..93076b2 100644
--- a/tests/libedataserverui/test-source-combo-box.c
+++ b/tests/libedataserverui/test-source-combo-box.c
@@ -93,7 +93,8 @@ main (gint argc,
 	registry = e_source_registry_new_sync (NULL, &error);
 
 	if (error != NULL) {
-		g_error ("Failed to load ESource registry: %s",
+		g_error (
+			"Failed to load ESource registry: %s",
 			error->message);
 		g_assert_not_reached ();
 	}
diff --git a/tests/libedataserverui/test-source-selector.c b/tests/libedataserverui/test-source-selector.c
index 7fd0075..82dbb83 100644
--- a/tests/libedataserverui/test-source-selector.c
+++ b/tests/libedataserverui/test-source-selector.c
@@ -133,7 +133,8 @@ main (gint argc,
 	registry = e_source_registry_new_sync (NULL, &error);
 
 	if (error != NULL) {
-		g_error ("Failed to load ESource registry: %s",
+		g_error (
+			"Failed to load ESource registry: %s",
 			error->message);
 		g_assert_not_reached ();
 	}



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