aboutsummaryrefslogtreecommitdiff
path: root/test/testprogs/util.h
blob: ec8e0e4c7af18d8272f3ab24526af08815ca4a78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (c) 2009 Petri Lehtinen <petri@digip.org>
 *
 * Jansson is free software; you can redistribute it and/or modify
 * it under the terms of the MIT license. See LICENSE for details.
 */

#ifndef TESTPROGS_UTIL_H
#define TESTPROGS_UTIL_H

#include <stdlib.h>

#define fail(msg)                                                \
    do {                                                         \
        fprintf(stderr, "%s:%s:%d: %s\n",                        \
                __FILE__, __FUNCTION__, __LINE__, msg);          \
        exit(1);                                                 \
    } while(0)

#endif