Dali 3D User Interface Engine
Macros
assert.h File Reference
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for assert.h:

Go to the source code of this file.

Macros

#define assert(exp)
 
#define assert_eq(var, ref)
 
#define assert_neq(var, ref)
 
#define assert_gt(var, ref)
 
#define assert_geq(var, ref)
 
#define assert_lt(var, ref)
 
#define assert_leq(var, ref)
 

Macro Definition Documentation

#define assert (   exp)
Value:
if (!(exp)) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Following expression is not true:\n" \
"%s\n", #exp); \
return 1; \
}

Definition at line 6 of file assert.h.

Referenced by UtcDaliAnyNegativeAssignmentOperators().

#define assert_eq (   var,
  ref 
)
Value:
if (var != ref) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Values \"%s\" and \"%s\" are not equal:\n" \
"%s == %d, %s == %d\n", \
#var, #ref, #var, (int)var, #ref, (int)ref); \
return 1; \
}

Definition at line 16 of file assert.h.

#define assert_geq (   var,
  ref 
)
Value:
if (var < ref) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Value \"%s\" is not greater or equal to \"%s\":\n" \
"%s == %d, %s == %d\n", \
#var, #ref, #var, var, #ref, ref); \
return 1; \
}

Definition at line 49 of file assert.h.

#define assert_gt (   var,
  ref 
)
Value:
if (var <= ref) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Value \"%s\" is not greater than \"%s\":\n" \
"%s == %d, %s == %d\n", \
#var, #ref, #var, var, #ref, ref); \
return 1; \
}

Definition at line 38 of file assert.h.

#define assert_leq (   var,
  ref 
)
Value:
if (var > ref) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Value \"%s\" is not lower or equal to \"%s\":\n" \
"%s == %d, %s == %d\n", \
#var, #ref, #var, var, #ref, ref); \
return 1; \
}

Definition at line 71 of file assert.h.

#define assert_lt (   var,
  ref 
)
Value:
if (var >= ref) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Value \"%s\" is not lower than \"%s\":\n" \
"%s == %d, %s == %d\n", \
#var, #ref, #var, var, #ref, ref); \
return 1; \
}

Definition at line 60 of file assert.h.

#define assert_neq (   var,
  ref 
)
Value:
if (var == ref) { \
fprintf(stderr, \
"Assert fail in %s:%d\n", __FILE__, __LINE__); \
fprintf(stderr, \
"Values \"%s\" and \"%s\" are equal:\n" \
"%s == %s == %d\n", \
#var, #ref, #var, #ref, (int)ref); \
return 1; \
}

Definition at line 27 of file assert.h.

Dali Docs Home
Read more about Dali