?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #ifndef UNITTEST_EXCEPTIONMACROS_H
  2. #define UNITTEST_EXCEPTIONMACROS_H
  3.  
  4. #include "Config.h"
  5.  
  6. #ifndef UNITTEST_NO_EXCEPTIONS
  7.    #define UNITTEST_IMPL_TRY(x) try x
  8.    #define UNITTEST_IMPL_THROW(x) throw x
  9.    #define UNITTEST_IMPL_RETHROW(ExceptionType) catch(ExceptionType&) { throw; }
  10.    #define UNITTEST_IMPL_CATCH(ExceptionType, ExceptionName, CatchBody) catch(ExceptionType& ExceptionName) CatchBody
  11.    #define UNITTEST_IMPL_CATCH_ALL(CatchBody) catch(...) CatchBody
  12. #else
  13.    #define UNITTEST_IMPL_TRY(x) x
  14.    #define UNITTEST_IMPL_THROW(x)
  15.    #define UNITTEST_IMPL_RETHROW(ExceptionType)
  16.    #define UNITTEST_IMPL_CATCH(ExceptionType, ExceptionName, CatchBody)
  17.    #define UNITTEST_IMPL_CATCH_ALL(CatchBody)
  18. #endif
  19.  
  20. #endif
  21.