File: Assert.h

package info (click to toggle)
proda 1.0-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 524 kB
  • ctags: 537
  • sloc: cpp: 8,283; xml: 163; makefile: 56
file content (18 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//////////////////////////////////////////////////////////////////////
// Assert.h
//
// Extension of C assert() that allows for error messages.
//////////////////////////////////////////////////////////////////////

#ifndef ASSERT_H
#define ASSERT_H

int _ASSERT_FAILED (const char *filename, int line_number, const char *error_msg);

#ifdef NDEBUG
#define ASSERT(test,error_msg)
#else
#define ASSERT(test,error_msg) (test ? 0 : _ASSERT_FAILED(__FILE__, __LINE__, error_msg))
#endif
  
#endif