Vault  4.1
Classes | Defines
vassert.h File Reference
#include "vtypes.h"
#include "vstring.h"
#include "vcodepoint.h"
#include "vchar.h"
#include "vinstant.h"
#include "vcolor.h"

Go to the source code of this file.

Classes

class  VAssert
 This static helper class provides the various overloaded assertion functions that we call from our VASSERT macros. More...

Defines

#define VASSERT(expression)   do { if (!(expression)) VAssert::failedAssert(#expression, __FILE__, __LINE__); } while (false)
#define VASSERT_VALUE(expression, valName, valString)   do { if (!(expression)) VAssert::failedAssertValue(#expression, #valName, valString, __FILE__, __LINE__); } while (false)
#define VASSERT_NULL(pointer)   do { if (pointer != NULL) VAssert::failedAssertNull(pointer, #pointer, __FILE__, __LINE__); } while (false)
#define VASSERT_NOT_NULL(pointer)   do { if (pointer == NULL) VAssert::failedAssertNotNull(#pointer, __FILE__, __LINE__); } while (false)
#define VASSERT_ZERO(i)   do { if (i != 0) VAssert::failedAssertZero((Vs64)i, #i, __FILE__, __LINE__); } while (false)
#define VASSERT_NON_ZERO(i)   do { if (i == 0) VAssert::failedAssertNonZero(#i, __FILE__, __LINE__); } while (false)
#define VASSERT_EQUAL(a, b)   do { if (a != b) VAssert::failedAssertEqual(a, b, #a, #b, __FILE__, __LINE__); } while (false)
#define VASSERT_NOT_EQUAL(a, b)   do { if (a == b) VAssert::failedAssertNotEqual(a, #a, #b, __FILE__, __LINE__); } while (false)
#define VASSERT_LESS_THAN(a, b)   do { if (!(a < b)) VAssert::failedLessGreaterComparison(true, false, a, b, #a, #b, __FILE__, __LINE__); } while (false)
#define VASSERT_LESS_THAN_OR_EQUAL(a, b)   do { if (!(a <= b)) VAssert::failedLessGreaterComparison(true, true, a, b, #a, #b, __FILE__, __LINE__); } while (false)
#define VASSERT_GREATER_THAN(a, b)   do { if (!(a > b)) VAssert::failedLessGreaterComparison(false, false, a, b, #a, #b, __FILE__, __LINE__); } while (false)
#define VASSERT_GREATER_THAN_OR_EQUAL(a, b)   do { if (!(a >= b)) VAssert::failedLessGreaterComparison(false, true, a, b, #a, #b, __FILE__, __LINE__); } while (false)
#define VASSERT_IN_RANGE(i, minVal, maxVal)   do { if (!((i >= minVal) && (i <= maxVal))) VAssert::failedRangeCheck(i, minVal, maxVal, #i, #minVal, #maxVal, __FILE__, __LINE__); } while (false)

Detailed Description

Definition in file vassert.h.


Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.