notmuch/test/notmuch-test.h
David Bremner 1d4812fd61 test: fix printf format
notmuch_status_t is an integer type, printing it as a string is a very
bad idea.
2016-09-22 08:11:42 -03:00

16 lines
279 B
C

#ifndef _NOTMUCH_TEST_H
#define _NOTMUCH_TEST_H
#include <stdio.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