* make mu-cmd reference-counted (make mu_msg_destroy internal, use
mu_msg_unref instead)
This commit is contained in:
@ -108,7 +108,7 @@ test_mu_store_store_and_count (void)
|
||||
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,"));
|
||||
mu_msg_destroy (msg);
|
||||
mu_msg_unref (msg);
|
||||
|
||||
/* add another one */
|
||||
msg = mu_msg_new (MU_TESTMAILDIR2 "bar/cur/mail3", NULL, NULL);
|
||||
@ -116,7 +116,7 @@ test_mu_store_store_and_count (void)
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, 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_destroy (msg);
|
||||
mu_msg_unref (msg);
|
||||
|
||||
/* 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);
|
||||
@ -124,7 +124,7 @@ test_mu_store_store_and_count (void)
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, MU_OK);
|
||||
g_assert_cmpuint (2,==,mu_store_count (store));
|
||||
|
||||
mu_msg_destroy (msg);
|
||||
mu_msg_unref (msg);
|
||||
mu_msg_gmime_uninit ();
|
||||
|
||||
mu_store_destroy (store);
|
||||
@ -156,7 +156,7 @@ test_mu_store_store_remove_and_count (void)
|
||||
g_assert (msg);
|
||||
g_assert_cmpuint (mu_store_store (store, msg), ==, MU_OK);
|
||||
g_assert_cmpuint (1,==,mu_store_count (store));
|
||||
mu_msg_destroy (msg);
|
||||
mu_msg_unref (msg);
|
||||
|
||||
/* remove one */
|
||||
mu_store_remove (store, MU_TESTMAILDIR "cur/1283599333.1840_11.cthulhu!2,");
|
||||
|
||||
Reference in New Issue
Block a user