Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 2000-2001 Microsoft Corporation
  3. Module Name:
  4. vststtools.hxx
  5. Abstract:
  6. Contains macros and function prototypes of helper
  7. routines used thoughout the VS Test programs.
  8. Author:
  9. Stefan R. Steiner [ssteiner] 05-17-2000
  10. Revision History:
  11. --*/
  12. #ifndef __H_VSTSTTOOLS_
  13. #define __H_VSTSTTOOLS_
  14. #include <assert.h>
  15. #pragma warning( disable : 4290 ) // ignore throw lists on definitions
  16. VOID AssertFail(LPCSTR FileName, UINT LineNumber, LPCSTR Condition);
  17. #if (DBG)
  18. #define VSTST_ASSERT( expr ) { \
  19. if ( ! ( expr ) ) { \
  20. AssertFail(__FILE__, __LINE__, #expr ); \
  21. } \
  22. }
  23. #else
  24. #define VSTST_ASSERT(expr)
  25. #endif
  26. #define VSTST_THROW( obj ) throw( obj )
  27. #define VSTST_STANDARD_CATCH() \
  28. catch( HRESULT hrExcept ) { hr = hrExcept; } \
  29. catch( ... ) { hr = E_UNEXPECTED; }
  30. #endif // __H_VSTSTTOOLS_