diff options
author | Not Zed <NotZed@Ximian.com> | 2004-12-03 11:36:57 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-12-03 11:36:57 +0800 |
commit | c83477345fa5dceb62b85efd0a76a54f94a78858 (patch) | |
tree | aaea668a8d4f768b96174ad81aca864983addd0c /camel/tests/lib/folders.c | |
parent | 300ec3f74d9f2ea59503ad267c927723ea59fd3e (diff) | |
download | gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.tar gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.tar.gz gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.tar.bz2 gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.tar.lz gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.tar.xz gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.tar.zst gsoc2013-evolution-c83477345fa5dceb62b85efd0a76a54f94a78858.zip |
have our own so we don't need to link with glib.
* camel-lock-helper.c (g_strerror): have our own so we don't need
to link with glib.
* providers/*/Makefile.am: Do not install ANY provider header
files. No providers are subclassable. No providers are directly
linkable.
* camel.pc.in: create package config file.
* tests/lib/folders.c (test_folder_message_ops): updated counts for
delete also marking unread.
* tests/lib/camel-test.c (camel_test_provider_init): new api for
initialising test system 'in-build'.
* camel-provider.c: remove the assertions, init if we need to,k
use pthread_once stuff to serialise it.
* tests/folder/test3.c (main): remove gtk stuff (???).
* tests/*: Fix all the makefiles. Made make-check work 'in-build'.
* tests/lib/folders.c (test_folder_counts): update for api changes.
(test_message_info): similar.
* providers/Makefile.am: removed groupwise from the build, this
can't go in here anymore, not in its current state.
* camel-net-utils.c (camel_gethostbyaddr_r)
(camel_gethostbyname_r): the old e_gethost* calls from
e-host-utils.c.
2004-11-15 Not Zed <NotZed@Ximian.com>
* providers/imap/camel-imap-utils.c (imap_path_to_physical):
copied from e-path.c.
(imap_path_find_folders): copied from e-path.c.
* camel.h: remove the provider stuff from the header.
* camel-provider.c: globalise provider_init variable, and asserton
it in all functions that rely on it.
* camel-service.c: removed getaddrinfo/etc.
* camel-net-utils.[ch]: separate out camel_getaddrinfo etc.
* Makefile.am: split camel into 2 libraries, libcamel and
libcamel-store.
* camel-multipart-signed.c (camel_multipart_signed_sign)
(camel_multipart_signed_verify, prepare_sign): remove old
deprecated api.
* camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt)
(camel_multipart_encrypted_decrypt): remove old deprecated api.
svn path=/trunk/; revision=28046
Diffstat (limited to 'camel/tests/lib/folders.c')
-rw-r--r-- | camel/tests/lib/folders.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c index e93d8caf2e..5104da6c12 100644 --- a/camel/tests/lib/folders.c +++ b/camel/tests/lib/folders.c @@ -12,13 +12,15 @@ test_folder_counts(CamelFolder *folder, int total, int unread) { GPtrArray *s; int i, myunread; + int gettotal, getunread; CamelMessageInfo *info; push("test folder counts %d total %d unread", total, unread); /* first, use the standard functions */ - check(camel_folder_get_message_count(folder) == total); - check(camel_folder_get_unread_message_count(folder) == total); + camel_object_get(folder, NULL, CAMEL_FOLDER_TOTAL, &gettotal, CAMEL_FOLDER_UNREAD, &getunread, 0); + check(gettotal == total); + check(getunread == unread); /* next, use the summary */ s = camel_folder_get_summary(folder); @@ -27,7 +29,7 @@ test_folder_counts(CamelFolder *folder, int total, int unread) myunread = s->len; for (i=0;i<s->len;i++) { info = s->pdata[i]; - if (info->flags & CAMEL_MESSAGE_SEEN) + if (camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN) myunread--; } check(unread == myunread); @@ -40,7 +42,7 @@ test_folder_counts(CamelFolder *folder, int total, int unread) myunread = s->len; for (i=0;i<s->len;i++) { info = camel_folder_get_message_info(folder, s->pdata[i]); - if (info->flags & CAMEL_MESSAGE_SEEN) + if (camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN) myunread--; camel_folder_free_message_info(folder, info); } @@ -70,7 +72,7 @@ test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info) /* FIXME: testing from/cc/to, etc is more tricky */ - check(info->date_sent == camel_mime_message_get_date(msg, NULL)); + check(camel_message_info_date_sent(info) == camel_mime_message_get_date(msg, NULL)); /* date received isn't set for messages that haven't been sent anywhere ... */ /*check(info->date_received == camel_mime_message_get_date_received(msg, NULL));*/ @@ -469,7 +471,7 @@ test_folder_message_ops(CamelSession *session, const char *name, int local, cons push("deleting first message & expunging"); camel_folder_delete_message(folder, uids->pdata[0]); - test_folder_counts(folder, 10, 10); + test_folder_counts(folder, 10, 9); camel_folder_expunge(folder, ex); check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex)); test_folder_not_message(folder, uids->pdata[0]); @@ -498,7 +500,7 @@ test_folder_message_ops(CamelSession *session, const char *name, int local, cons push("deleting last message & expunging"); camel_folder_delete_message(folder, uids->pdata[8]); /* sync? */ - test_folder_counts(folder, 9, 9); + test_folder_counts(folder, 9, 8); camel_folder_expunge(folder, ex); check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex)); test_folder_not_message(folder, uids->pdata[8]); @@ -529,7 +531,7 @@ test_folder_message_ops(CamelSession *session, const char *name, int local, cons camel_folder_delete_message(folder, uids->pdata[j]); } /* sync? */ - test_folder_counts(folder, 8, 8); + test_folder_counts(folder, 8, 0); camel_folder_expunge(folder, ex); check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex)); for (j=0;j<8;j++) { |