986ef2eda4672900238063733b9d513e900cddd1
[jansson.git] / test / suites / api / util.h
1 /*
2  * Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
3  *
4  * Jansson is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7
8 #ifndef TESTPROGS_UTIL_H
9 #define TESTPROGS_UTIL_H
10
11 #include <stdlib.h>
12
13 #define fail(msg)                                                \
14     do {                                                         \
15         fprintf(stderr, "%s:%s:%d: %s\n",                        \
16                 __FILE__, __FUNCTION__, __LINE__, msg);          \
17         exit(1);                                                 \
18     } while(0)
19
20 #endif