00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TJTEST_H
00019 #define TJTEST_H
00020
00021 #include <tjutils/tjstatic.h>
00022 #include <tjutils/tjlabel.h>
00023
00029 #ifndef NO_UNIT_TEST
00030
00036 class UnitTest : public StaticHandler<UnitTest>, public Labeled {
00037
00038 public:
00039
00040 static int check_all();
00041
00042 static void init_static();
00043 static void destroy_static();
00044
00045 static const char* get_compName();
00046
00047 protected:
00048
00049 UnitTest(const char* label);
00050 virtual ~UnitTest() {}
00051
00052 private:
00053
00054 virtual bool check() const = 0;
00055
00056 static STD_list<UnitTest*>* tests;
00057
00058 };
00059
00060 #endif
00061
00064 #endif