ATLAS Offline Software
Loading...
Searching...
No Matches
SGassert.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
12#ifndef TEST_SGASSERT_H
13# define TEST_SGASSERT_H
14
15#include <cassert>
16#include <iostream>
17#include <print>
18
19#undef NDEBUG
20
21#define SGASSERT( TRUEEXPR ) assert(TRUEEXPR)
22#define SGASSERTERROR( FALSEEXPR ) \
23 std::println (std::cerr, "Now we expect to see an error message:\n" \
24 "----Error Message Starts--->>"); \
25 assert(!(FALSEEXPR)); \
26 std::println (std::cerr, "<<---Error Message Ends-------");
27
28
29#endif // TEST_SGASSERT_H