Skip to content

Commit

Permalink
* test-mu-store.c: stay within 33 line limit for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
djcb committed Dec 4, 2010
1 parent 9325828 commit 104efbc
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/tests/test-mu-store.c
Expand Up @@ -90,8 +90,7 @@ test_mu_store_store_and_count (void)
MuMsg *msg;
MuStore *store;
gchar* tmpdir;
GError *err;


tmpdir = test_mu_common_get_random_tmpdir();
g_assert (tmpdir);

Expand All @@ -103,10 +102,7 @@ test_mu_store_store_and_count (void)
mu_msg_gmime_init ();

/* add one */
err = NULL;
msg = mu_msg_new (MU_TESTMAILDIR "cur/1283599333.1840_11.cthulhu!2,",
NULL, &err);

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 (1,==,mu_store_count (store));
Expand All @@ -115,18 +111,16 @@ test_mu_store_store_and_count (void)
mu_msg_destroy (msg);

/* add another one */
msg = mu_msg_new (MU_TESTMAILDIR2 "bar/cur/mail3",
NULL, NULL);
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 (2,==,mu_store_count (store));
g_assert_cmpuint (TRUE,==,mu_store_contains_message
(store, MU_TESTMAILDIR2 "bar/cur/mail3"));
g_assert_cmpuint (TRUE,==,mu_store_contains_message (store, MU_TESTMAILDIR2 "bar/cur/mail3"));
mu_msg_destroy (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);
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 (2,==,mu_store_count (store));

Expand Down

0 comments on commit 104efbc

Please sign in to comment.