kakoune

Fork of kakoune, an acceptable text editor
git clone git://git.laack.co/kakoune.git
Log | Files | Refs

unit_tests.hh (382B)


      1 #ifndef unit_tests_hh_INCLUDED
      2 #define unit_tests_hh_INCLUDED
      3 
      4 namespace Kakoune
      5 {
      6 
      7 struct UnitTest
      8 {
      9 #ifdef KAK_DEBUG
     10     UnitTest(void (*func)()) : func(func), next(list) { list = this; }
     11     void (*func)();
     12     const UnitTest* next;
     13 
     14     static void run_all_tests();
     15     static UnitTest* list;
     16 #else
     17     UnitTest(void (*func)()) {}
     18 #endif
     19 };
     20 
     21 }
     22 
     23 #endif // unit_tests_hh_INCLUDED