2016-06-04 14:29:14 +02:00
|
|
|
#ifndef _NOTMUCH_TEST_H
|
|
|
|
#define _NOTMUCH_TEST_H
|
|
|
|
#include <stdio.h>
|
2020-06-30 03:14:08 +02:00
|
|
|
#include <stdlib.h>
|
2016-06-04 14:29:14 +02:00
|
|
|
#include <notmuch.h>
|
|
|
|
|
|
|
|
inline static void
|
2019-06-25 19:55:45 +02:00
|
|
|
expect0 (int line, notmuch_status_t ret)
|
2016-06-04 14:29:14 +02:00
|
|
|
{
|
2019-06-25 19:55:45 +02:00
|
|
|
if (ret) {
|
2016-09-22 13:11:42 +02:00
|
|
|
fprintf (stderr, "line %d: %d\n", line, ret);
|
2016-06-04 14:29:14 +02:00
|
|
|
exit (1);
|
2019-06-25 19:55:45 +02:00
|
|
|
}
|
2016-06-04 14:29:14 +02:00
|
|
|
}
|
|
|
|
|
2019-06-25 19:55:45 +02:00
|
|
|
#define EXPECT0(v) expect0 (__LINE__, v);
|
2016-06-04 14:29:14 +02:00
|
|
|
#endif
|