diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2010-02-02 08:46:01 +0200 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2010-02-02 08:46:01 +0200 |
| commit | 933245928fd2bdbb1fb1c010a028b4970593fc82 (patch) | |
| tree | 5bc853cb793954fcb18c09574ef8d6e6e2391ea9 /src/tests | |
| parent | 64246329f5f9e05241a3a1b0abf51e0a3d591d17 (diff) | |
* mu-index.c, mu-maildir.c, test-mu-query.c: some refactoring to get max line
len <= 35
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test-mu-query.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/tests/test-mu-query.c b/src/tests/test-mu-query.c index 0a15f6d..0070268 100644 --- a/src/tests/test-mu-query.c +++ b/src/tests/test-mu-query.c @@ -92,8 +92,6 @@ test_mu_query_01 (void) { "p:cur", 6 }, { "path:new", 4 } }; - - xpath = fill_database (); g_assert (xpath != NULL); @@ -101,18 +99,14 @@ test_mu_query_01 (void) for (i = 0; i != G_N_ELEMENTS(queries); ++i) { - int count; - MuMsgIterXapian *iter; - - iter = mu_query_xapian_run (query, queries[i].query, NULL, FALSE, 1); - - count = 0; - if (!mu_msg_iter_xapian_is_null (iter)) { - do { - ++count; - } while (mu_msg_iter_xapian_next (iter)); - } - + int count = 0; + MuMsgIterXapian *iter = + mu_query_xapian_run (query, queries[i].query, NULL, + FALSE, 1); + + if (!mu_msg_iter_xapian_is_null (iter)) + do { ++count; } while (mu_msg_iter_xapian_next (iter)); + g_assert_cmpuint (queries[i].count, ==, count); mu_msg_iter_xapian_destroy (iter); } |
