Source code of Windows XP (NT5)
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.

80 lines
3.0 KiB

  1. /*****************************************************************************
  2. * *
  3. * ASSERTF.H *
  4. * *
  5. * Copyright (C) Microsoft Corporation 1990. *
  6. * All Rights reserved. *
  7. * *
  8. ******************************************************************************
  9. * *
  10. * Module Intent *
  11. * *
  12. * Interface to assertion macros. *
  13. * *
  14. ******************************************************************************
  15. * *
  16. * Testing Notes *
  17. * *
  18. ******************************************************************************
  19. * *
  20. * Current Owner: *
  21. * *
  22. ******************************************************************************
  23. * *
  24. * Released by Development: *
  25. * *
  26. *****************************************************************************/
  27. /*****************************************************************************
  28. *
  29. * Revision History: Created 00/00/00 by God
  30. *
  31. * 12/04/91 DAVIDJES changed for LilJoe move to Orkin debugging technology
  32. *
  33. *****************************************************************************/
  34. #include <orkin.h>
  35. #ifndef _DEBUG
  36. #define assert(f)
  37. #ifndef MOS
  38. #ifdef Assert
  39. #undef Assert
  40. #endif
  41. #define Assert(f)
  42. #endif
  43. #define AssertF(f)
  44. #define NotReached()
  45. #define VerifyF(f) (f)
  46. #define FVerifyF(f) (f)
  47. #define Ensure( x1, x2 ) (x1)
  48. #define Deny( x1, x2 ) (x1)
  49. #define DoDebug(x)
  50. #else
  51. #ifndef MOS
  52. #ifdef Assert
  53. #undef Assert
  54. #endif
  55. // This is already defined in MOS' debug.h included in <orkin.h>
  56. // 'assert' is then diverted to a more user friendly one in MOS' debug.lib
  57. #define Assert(f) assert(f)
  58. #endif
  59. #define AssertF(f) assert(f)
  60. #define NotReached() assert(0)
  61. #define VerifyF(f) assert(f)
  62. #define FVerifyF(f) assert(f)
  63. #define Ensure( x1, x2 ) assert((x1)==(x2))
  64. #define Deny( x1, x2 ) assert((x1)!=(x2))
  65. #define DoDebug(x) (x)
  66. #endif