summaryrefslogtreecommitdiff
path: root/tests/lib/myassert.h
blob: 4100c603510a8e2c841e80cc0bb64b81b365b163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef TP_TESTS_MYASSERT_H
#define TP_TESTS_MYASSERT_H

#include <glib.h>
#include <telepathy-glib/util.h>

#define MYASSERT(assertion, extra_format, ...)\
  G_STMT_START {\
      if (!(assertion))\
        {\
          g_error ("\n%s:%d: Assertion failed: %s" extra_format,\
            __FILE__, __LINE__, #assertion, ##__VA_ARGS__);\
        }\
  } G_STMT_END

#endif