diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-10-15 01:38:44 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-10-15 01:38:44 +0200 |
commit | e892bd1797e99c8afaa6afdbe413fda78937c9c3 (patch) | |
tree | a5390bd377757bcb93d94a6bced53ab72a1b381b /src/journal/test-journal.c | |
parent | de7b95cdc3228131498021c2fdcf6647004c3920 (diff) |
journal: unify code for up and for down traversal
Diffstat (limited to 'src/journal/test-journal.c')
-rw-r--r-- | src/journal/test-journal.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/journal/test-journal.c b/src/journal/test-journal.c index 3b67f1aa9f..93e2b4dab4 100644 --- a/src/journal/test-journal.c +++ b/src/journal/test-journal.c @@ -54,30 +54,30 @@ int main(int argc, char *argv[]) { journal_file_dump(f); - assert(journal_file_next_entry(f, NULL, &o, NULL) == 1); + assert(journal_file_next_entry(f, NULL, DIRECTION_DOWN, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 1); - assert(journal_file_next_entry(f, o, &o, NULL) == 1); + assert(journal_file_next_entry(f, o, DIRECTION_DOWN, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 2); - assert(journal_file_next_entry(f, o, &o, NULL) == 1); + assert(journal_file_next_entry(f, o, DIRECTION_DOWN, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 3); - assert(journal_file_next_entry(f, o, &o, NULL) == 0); + assert(journal_file_next_entry(f, o, DIRECTION_DOWN, &o, NULL) == 0); - assert(journal_file_find_first_entry(f, test, strlen(test), &o, NULL) == 1); + assert(journal_file_find_first_entry(f, test, strlen(test), DIRECTION_DOWN, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 1); - assert(journal_file_find_last_entry(f, test, strlen(test), &o, NULL) == 1); + assert(journal_file_find_first_entry(f, test, strlen(test), DIRECTION_UP, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 3); - assert(journal_file_find_last_entry(f, test2, strlen(test2), &o, NULL) == 1); + assert(journal_file_find_first_entry(f, test2, strlen(test2), DIRECTION_UP, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 2); - assert(journal_file_find_first_entry(f, test2, strlen(test2), &o, NULL) == 1); + assert(journal_file_find_first_entry(f, test2, strlen(test2), DIRECTION_DOWN, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 2); - assert(journal_file_find_first_entry(f, "quux", 4, &o, NULL) == 0); + assert(journal_file_find_first_entry(f, "quux", 4, DIRECTION_DOWN, &o, NULL) == 0); assert(journal_file_move_to_entry(f, 1, &o, NULL) == 1); assert(le64toh(o->entry.seqnum) == 1); |