ATLAS Offline Software
SGassert.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  macro to assert an error condition
7  ----------------------------------
8  ATLAS Collaboration
9  ***************************************************************************/
10 
11 // $Id: SGassert.h,v 1.2 2005-11-29 00:51:33 calaf Exp $
12 
13 
14 #ifndef TEST_SGASSERT_H
15 # define TEST_SGASSERT_H
16 
17 #include <cassert>
18 #include <iostream>
19 
20 #undef NDEBUG
21 
22 #define SGASSERT( TRUEEXPR ) assert(TRUEEXPR)
23 #define SGASSERTERROR( FALSEEXPR ) \
24  std::cerr << "Now we expect to see an error message:" << std::endl \
25  << "----Error Message Starts--->>" << std::endl; \
26  assert(!(FALSEEXPR)); \
27  std::cerr<< "<<---Error Message Ends-------" << std::endl
28 
29 
30 #endif // TEST_SGASSERT_H