diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2015-01-22 22:53:42 +0100 |
---|---|---|
committer | Ronny Chevalier <chevalier.ronny@gmail.com> | 2015-01-22 23:10:56 +0100 |
commit | 0c0cdb06c139b52ff103287f6909b3daa5b2dc54 (patch) | |
tree | f904cb032c43691d325b6bb19941a2c115a07416 /src/journal/test-journal-flush.c | |
parent | 714af6af8a912650f9129f8b056ed92589443060 (diff) |
tests: use assert_se instead of assert
Otherwise they can be optimized away with -DNDEBUG
Diffstat (limited to 'src/journal/test-journal-flush.c')
-rw-r--r-- | src/journal/test-journal-flush.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/test-journal-flush.c b/src/journal/test-journal-flush.c index 40ede4a926..914ca0b4d1 100644 --- a/src/journal/test-journal-flush.c +++ b/src/journal/test-journal-flush.c @@ -22,6 +22,7 @@ #include <fcntl.h> #include "sd-journal.h" +#include "macro.h" #include "journal-file.h" #include "journal-internal.h" @@ -49,13 +50,13 @@ int main(int argc, char *argv[]) { JournalFile *f; f = j->current_file; - assert(f && f->current_offset > 0); + assert_se(f && f->current_offset > 0); r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o); - assert(r >= 0); + assert_se(r >= 0); r = journal_file_copy_entry(f, new_journal, o, f->current_offset, NULL, NULL, NULL); - assert(r >= 0); + assert_se(r >= 0); n++; if (n > 10000) |