summaryrefslogtreecommitdiff
path: root/src/tests/eunit_tests.h
blob: 000d18c015962a8edf6601d59a2d2c521486ed32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _EUNIT_TESTS_H
#define _EUNIT_TESTS_H

#define _EUNIT_EXIT_CODE 1

#define fail_if(x) \
   do { \
        if (x) \
          { \
             fprintf(stderr, "%s:%d - Failure '%s' is TRUE.", \
                   __FILE__, __LINE__, # x); \
             exit(_EUNIT_EXIT_CODE); \
          } \
   } while (0)

#endif