* mu-store.cc: some optimizations, and add the possibility to use the slightly
faster 'add_document' instead of 'replace_document' (it's not used yet though)
This commit is contained in:
@ -100,7 +100,7 @@ test_mu_store_store_and_count (void)
|
||||
/* add one */
|
||||
msg = mu_msg_new (MU_TESTMAILDIR "cur/1283599333.1840_11.cthulhu!2,", NULL, NULL);
|
||||
g_assert (msg);
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, MU_OK);
|
||||
g_assert_cmpuint (mu_store_store (store, msg, TRUE), ==, MU_OK);
|
||||
g_assert_cmpuint (1,==,mu_store_count (store));
|
||||
g_assert_cmpuint (TRUE,==,mu_store_contains_message
|
||||
(store, MU_TESTMAILDIR "cur/1283599333.1840_11.cthulhu!2,"));
|
||||
@ -109,7 +109,7 @@ test_mu_store_store_and_count (void)
|
||||
/* add another one */
|
||||
msg = mu_msg_new (MU_TESTMAILDIR2 "bar/cur/mail3", NULL, NULL);
|
||||
g_assert (msg);
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, MU_OK);
|
||||
g_assert_cmpuint (mu_store_store (store, msg, TRUE), ==, MU_OK);
|
||||
g_assert_cmpuint (2,==,mu_store_count (store));
|
||||
g_assert_cmpuint (TRUE,==,mu_store_contains_message (store, MU_TESTMAILDIR2 "bar/cur/mail3"));
|
||||
mu_msg_unref (msg);
|
||||
@ -117,7 +117,7 @@ test_mu_store_store_and_count (void)
|
||||
/* try to add the first one again. count should be 2 still */
|
||||
msg = mu_msg_new (MU_TESTMAILDIR "cur/1283599333.1840_11.cthulhu!2,", NULL, NULL);
|
||||
g_assert (msg);
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, MU_OK);
|
||||
g_assert_cmpuint (mu_store_store (store, msg, TRUE), ==, MU_OK);
|
||||
g_assert_cmpuint (2,==,mu_store_count (store));
|
||||
|
||||
mu_msg_unref (msg);
|
||||
@ -150,7 +150,7 @@ test_mu_store_store_remove_and_count (void)
|
||||
msg = mu_msg_new (MU_TESTMAILDIR "cur/1283599333.1840_11.cthulhu!2,",
|
||||
NULL, &err);
|
||||
g_assert (msg);
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, MU_OK);
|
||||
g_assert_cmpuint (mu_store_store (store, msg, TRUE), ==, MU_OK);
|
||||
g_assert_cmpuint (1,==,mu_store_count (store));
|
||||
mu_msg_unref (msg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user