]> git.notmuchmail.org Git - notmuch/blob - test/notmuch-test.h
3a0e90a3ecf93200e5f38a854e2c57183dacda8b
[notmuch] / test / notmuch-test.h
1 #ifndef _NOTMUCH_TEST_H
2 #define _NOTMUCH_TEST_H
3 #include <assert.h>
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <sys/wait.h>
8 #include <talloc.h>
9 #include <unistd.h>
10
11 #include <notmuch.h>
12
13 inline static void
14 expect0 (int line, notmuch_status_t ret)
15 {
16     if (ret) {
17         fprintf (stderr, "line %d: %d\n", line, ret);
18         exit (1);
19     }
20 }
21
22 #define EXPECT0(v)  expect0 (__LINE__, v);
23 #endif