jle_cpp_tk
0.0 2015-04-03 sh1:"d699093732dd5f321606d0ff7a6b63b229f1922c"
A small, safe, selft contained, soft-realtime C++ toolkit
Main Page
Namespaces
Classes
Files
Examples
File List
test.h
1
#ifndef JLECPPTK_TEST_H
2
#define JLECPPTK_TEST_H
3
4
10
#include <iostream>
11
12
#include "core/string.h"
13
#include "core/misc.h"
14
15
19
#define JLE_TEST_FILE std::cout << std::endl << std::endl << std::endl \
20
<< "_________________________________________________" << std::endl << std::endl \
21
<< "TESTING on FILE -> " << __FILE__ << std::endl;
22
23
27
#define JLE_TEST_INIT std::cout << std::endl \
28
<< std::endl << "INIT:> << " << __FUNCTION__ << " >>" << std::endl;
29
33
#define JLE_TEST_DOT std::cout << "." << std::flush;
34
35
39
#define JLE_TEST_ASSERT_NO_DOT(__EXPRESION__) \
40
if((__EXPRESION__) == false) \
41
{ \
42
std::cerr << std::endl << "ERROR... in " << JLE_HERE << std::endl; \
43
std::cerr << std::endl << (#__EXPRESION__) << std::endl; \
44
exit(-1); \
45
}
46
50
#define JLE_TEST_ASSERT(__EXPRESION__) \
51
JLE_TEST_ASSERT_NO_DOT(__EXPRESION__) \
52
else { \
53
JLE_TEST_DOT \
54
}
55
56
57
61
#define JLE_TEST_REPORT std::cout << std::endl << "FINISHED TEST OK." << std::endl; return 0;
62
63
64
#define JLE_TEST_EXCEPTION(__EXPRESION__) \
65
{bool except = false; try { (void) (__EXPRESION__); } catch(...) { except=true; }; JLE_TEST_ASSERT(except);}
66
67
68
69
namespace
jle
{
70
71
72
73
74
};
75
76
77
78
#endif // JLECPPTK_TEST_H
jle
generic namespace
Definition:
alarm.cpp:12
src
core
test.h
Generated on Wed Mar 16 2016 20:34:38 for jle_cpp_tk by
1.8.11