(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.8 and 1.9

version 1.8, 2007/07/02 11:01:13 version 1.9, 2007/07/12 10:48:00
Line 33 
Line 33 
 #ifndef Pegasus_Assert_h #ifndef Pegasus_Assert_h
 #define Pegasus_Assert_h #define Pegasus_Assert_h
  
 #ifdef PEGASUS_OS_ZOS  
 #include <ctest.h>  
 # define PEGASUS_ASSERT_CTRACE(COND)                              \  
     do                                                            \  
     {                                                             \  
         if (!(COND))                                              \  
         {                                                         \  
             char buffer[200];                                     \  
             sprintf(buffer,                                       \  
                 "PEGASUS_ASSERT failed in file %s at line %d\n",  \  
                 __FILE__, __LINE__);                              \  
             ctrace(buffer);                                       \  
         }                                                         \  
     } while (0);  
 #else  
 # define PEGASUS_ASSERT_CTRACE(COND)  
 #endif  
  
 // NOTE: // NOTE:
 // //
Line 82 
Line 65 
     defining the file, line and condition that was tested.     defining the file, line and condition that was tested.
 */ */
  
 //#define PEGASUS_ASSERT(COND) assert(COND)  #define PEGASUS_ASSERT(COND) assert(COND)
 #define PEGASUS_ASSERT(COND)          \  
     do                                \  
     {                                 \  
         PEGASUS_ASSERT_CTRACE(COND);  \  
         assert(COND);                 \  
     } while (0)  
  
 /* define PEGASUS_DEBUG_ASSERT() assertion statement. This statement tests the /* define PEGASUS_DEBUG_ASSERT() assertion statement. This statement tests the
    condition defined by the parameters and if not True executes an assert.    condition defined by the parameters and if not True executes an assert.
Line 102 
Line 80 
 */ */
  
 #ifdef PEGASUS_DEBUG #ifdef PEGASUS_DEBUG
 //# define PEGASUS_DEBUG_ASSERT(COND) assert(COND)  # define PEGASUS_DEBUG_ASSERT(COND) assert(COND)
 # define PEGASUS_DEBUG_ASSERT(COND) PEGASUS_ASSERT(COND)  
 #else #else
 # define PEGASUS_DEBUG_ASSERT(COND) # define PEGASUS_DEBUG_ASSERT(COND)
 #endif #endif
Line 114 
Line 91 
     {                                                                     \     {                                                                     \
         if (!(COND))                                                      \         if (!(COND))                                                      \
         {                                                                 \         {                                                                 \
             PEGASUS_ASSERT_CTRACE(COND)                                   \  
             printf("PEGASUS_TEST_ASSERT failed in file %s at line %d\n",  \             printf("PEGASUS_TEST_ASSERT failed in file %s at line %d\n",  \
                 __FILE__, __LINE__);                                      \                 __FILE__, __LINE__);                                      \
             abort();                                                      \             abort();                                                      \


Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2