]> git.notmuchmail.org Git - notmuch/blob - test/notmuch-test.h
45d03d67540a795540da7287e1212d460b6289af
[notmuch] / test / notmuch-test.h
1 #ifndef _NOTMUCH_TEST_H
2 #define _NOTMUCH_TEST_H
3 #include <stdio.h>
4 #include <notmuch.h>
5
6 inline static void
7 expect0(int line, notmuch_status_t ret)
8 {
9    if (ret) {
10         fprintf (stderr, "line %d: %d\n", line, ret);
11         exit (1);
12    }
13 }
14
15 #define EXPECT0(v)  expect0(__LINE__, v);
16 #endif