00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GLASSERT_H
00018 #define GLASSERT_H
00019
00020 #include <iostream>
00021
00022
00023 void GLAssert(bool, const char*);
00024
00025 #define TESTING_STREAM std::cout
00026 #define ASSERTION_STREAM std::cerr
00027
00028
00029 #define TYPE_NAME(tn) \
00030 virtual const char* getType() { return #tn; }
00031
00032
00033
00034
00035
00036
00037 #ifdef TESTING
00038 #define TEST_FUNC(a) a
00039 #else
00040 #define TEST_FUNC(a)
00041 #endif
00042
00043 #ifdef TESTING
00044 #define PRINT(a) TESTING_STREAM<< a <<std::endl;
00045 #else
00046 #define PRINT(a)
00047 #endif
00048
00049 #ifdef DEBUG
00050 #define customAssert(a,b) GLAssert( ((a)) , ((b)) );
00051 #else
00052 #define customAssert(a,b)
00053 #endif
00054
00055 #ifdef DEBUG
00056 #define DEBUG_PRINT(debug_string) std::cerr<< debug_string <<std::endl;
00057 #else
00058 #define DEBUG_PRINT(debug_string)
00059 #endif
00060
00061
00062 #endif