File: myassert.h

package info (click to toggle)
telepathy-glib 0.24.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,756 kB
  • sloc: ansic: 124,638; xml: 34,410; sh: 4,531; python: 3,528; makefile: 1,722; javascript: 211; cpp: 16
file content (16 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (7)
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/telepathy-glib.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