diff options
Diffstat (limited to 'camel/tests')
-rw-r--r-- | camel/tests/folder/test2.c | 12 | ||||
-rw-r--r-- | camel/tests/lib/folders.c | 10 |
2 files changed, 13 insertions, 9 deletions
diff --git a/camel/tests/folder/test2.c b/camel/tests/folder/test2.c index 06053f76c0..a3a8f014b8 100644 --- a/camel/tests/folder/test2.c +++ b/camel/tests/folder/test2.c @@ -112,7 +112,8 @@ int main(int argc, char **argv) push("checking it is the right message (subject): %s", subject); info = camel_folder_get_message_info(folder, uids->pdata[j]); - check_msg(strcmp(info->subject, subject)==0, "info->subject %s", info->subject); + check_msg(strcmp(camel_message_info_subject(info), subject)==0, + "info->subject %s", camel_message_info_subject(info)); camel_folder_free_uids(folder, uids); pull(); @@ -150,7 +151,8 @@ int main(int argc, char **argv) test_folder_message(folder, uids->pdata[j]); info = camel_folder_get_message_info(folder, uids->pdata[j]); - check_msg(strcmp(info->subject, subject)==0, "info->subject %s", info->subject); + check_msg(strcmp(camel_message_info_subject(info), subject)==0, + "info->subject %s", camel_message_info_subject(info)); test_free(subject); pull(); } @@ -175,7 +177,8 @@ int main(int argc, char **argv) test_folder_message(folder, uids->pdata[j]); info = camel_folder_get_message_info(folder, uids->pdata[j]); - check_msg(strcmp(info->subject, subject)==0, "info->subject %s", info->subject); + check_msg(strcmp(camel_message_info_subject(info), subject)==0, + "info->subject %s", camel_message_info_subject(info)); test_free(subject); pull(); } @@ -202,7 +205,8 @@ int main(int argc, char **argv) test_folder_message(folder, uids->pdata[j]); info = camel_folder_get_message_info(folder, uids->pdata[j]); - check_msg(strcmp(info->subject, subject)==0, "info->subject %s", info->subject); + check_msg(strcmp(camel_message_info_subject(info), subject)==0, + "info->subject %s", camel_message_info_subject(info)); test_free(subject); pull(); } diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c index 738f8d2913..7be1b0c4cf 100644 --- a/camel/tests/lib/folders.c +++ b/camel/tests/lib/folders.c @@ -62,8 +62,8 @@ safe_strcmp(const char *a, const char *b) void test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info) { - check_msg(safe_strcmp(info->subject, camel_mime_message_get_subject(msg)) == 0, - "info->subject = '%s', get_subject() = '%s'", info->subject, camel_mime_message_get_subject(msg)); + check_msg(safe_strcmp(camel_message_info_subject(info), camel_mime_message_get_subject(msg)) == 0, + "info->subject = '%s', get_subject() = '%s'", camel_message_info_subject(info), camel_mime_message_get_subject(msg)); /* FIXME: testing from/cc/to, etc is more tricky */ @@ -91,7 +91,7 @@ test_folder_message(CamelFolder *folder, const char *uid) /* first try getting info */ info = camel_folder_get_message_info(folder, uid); check(info != NULL); - check(strcmp(info->uid, uid) == 0); + check(strcmp(camel_message_info_uid(info), uid) == 0); /* then, getting message */ msg = camel_folder_get_message(folder, uid, ex); @@ -109,7 +109,7 @@ test_folder_message(CamelFolder *folder, const char *uid) found = 0; for (i=0;i<s->len;i++) { info = s->pdata[i]; - if (strcmp(info->uid, uid) == 0) + if (strcmp(camel_message_info_uid(info), uid) == 0) found++; } check(found == 1); @@ -160,7 +160,7 @@ test_folder_not_message(CamelFolder *folder, const char *uid) found = 0; for (i=0;i<s->len;i++) { info = s->pdata[i]; - if (strcmp(info->uid, uid) == 0) + if (strcmp(camel_message_info_uid(info), uid) == 0) found++; } check(found == 0); |