notmuch/test/notmuch-test.h
David Bremner 1643c0459a test: move system includes to notmuch-test.h
This removes some redudant includes, and will also make it easier to
introduce "#define _GNU_SOURCE", which must come before all system
includes.
2021-12-04 12:36:08 -04:00

23 lines
406 B
C

#ifndef _NOTMUCH_TEST_H
#define _NOTMUCH_TEST_H
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <talloc.h>
#include <unistd.h>
#include <notmuch.h>
inline static void
expect0 (int line, notmuch_status_t ret)
{
if (ret) {
fprintf (stderr, "line %d: %d\n", line, ret);
exit (1);
}
}
#define EXPECT0(v) expect0 (__LINE__, v);
#endif