Simple SFML GUI  0.2a
UTest.hpp
1 #ifndef UTEST_HPP
2 #define UTEST_HPP
3 
4 class UTest {
5 protected:
6  int result = 0;
7 
8 public:
9  inline operator int() {
10  return result;
11  }
12 };
13 
14 #ifdef UT_FRIEND
15  #undef UT_FRIEND
16 #endif
17 
18 #ifndef UT_DISABLED
19  #ifdef UT_CLASS
20  #define UT_FRIEND friend class UT_CLASS;
21  #define UT_MAIN() int main(){ return UT_CLASS(); }
22  #define UT_SIMPLE_BEGIN() class UT_CLASS: public UTest { public: UT_CLASS() {
23  #define UT_SIMPLE_END() } }; UT_MAIN();
24 
25  #else
26  #define UT_FRIEND
27  #endif
28 #else
29  #define UT_FRIEND
30 #endif
31 
32 #endif
Definition: UTest.hpp:4