(file) Return to PegasusAssert.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/PegasusAssert.h between version 1.14 and 1.15

version 1.14, 2012/08/02 12:18:16 version 1.15, 2013/02/18 15:00:21
Line 91 
Line 91 
 # define PEGASUS_DEBUG_ASSERT(COND) # define PEGASUS_DEBUG_ASSERT(COND)
 #endif #endif
  
   
 #define PEGASUS_TEST_ASSERT(COND)                                         \ #define PEGASUS_TEST_ASSERT(COND)                                         \
     do                                                                    \     do                                                                    \
     {                                                                     \     {                                                                     \
Line 105 
Line 104 
  
 # endif /* PEGASUS_OS_ZOS */ # endif /* PEGASUS_OS_ZOS */
  
   
   /* define PEGASUS_FCT_EXECUTE_AND_ASSERT assertion statement.
   
      Use this macro to avoid unused variables instead of PEGASUS_ASSERT when
      the return value of a function is only used to do an assert check.
   
      This statement compares the return value of function against VALUE for
      equalness but only if assertion is enabled. The Function FCT will always be
      called (equal if assertion is enabled or disabled).
   
      Do this:
   
          PEGASUS_FCT_EXECUTE_AND_ASSERT(true, f());
   
      Not this:
          bool returnCode = f();
          PEGASUS_ASSERT(true == returnCode);
   */
   #if defined(PEGASUS_NOASSERTS) || defined(NDEBUG)
   # define PEGASUS_FCT_EXECUTE_AND_ASSERT(VALUE,FCT) FCT
   #else
   # define PEGASUS_FCT_EXECUTE_AND_ASSERT(VALUE,FCT) PEGASUS_ASSERT(VALUE == FCT)
   #endif
   
 /** /**
     Defines PEGASUS_DISABLED_TEST_ASSERT(COND) assertion statement.     Defines PEGASUS_DISABLED_TEST_ASSERT(COND) assertion statement.
     This assert generates an error message and executes an exit(0) so that     This assert generates an error message and executes an exit(0) so that


Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2