/usr/include/diagnostics/assert_annotation.hpp is in libdiagnostics-dev 0.3.3-10+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /*
* Diagnostics - a unified framework for code annotation, logging,
* program monitoring, and unit-testing.
*
* Copyright (C) 2009 Christian Schallhart <christian@schallhart.net>,
* Michael Tautschnig <tautschnig@forsyte.de>
* 2008 model.in.tum.de group, FORSYTE group
* 2006-2007 model.in.tum.de group
* 2002-2005 Christian Schallhart
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file diagnostics/macros/assert_annotation.hpp
*
* $Id: assert_annotation.hpp,v 1.9 2005/06/23 09:54:21 esdentem Exp $
*
* @author Christian Schallhart
*
* @brief [LEVEL: beta] @ref DIAGNOSTICS_BASE_ASSERT
*
* @test diagnostics/macros/assert_annotation.t.cpp
*/
#ifndef DIAGNOSTICS__MACROS__ASSERT_ANNOTATION_INCLUDE_GUARD
#define DIAGNOSTICS__MACROS__ASSERT_ANNOTATION_INCLUDE_GUARD
// DIAGNOSTICS_BASE_LOG
#include <diagnostics/frame/logging_facility.hpp>
/**
* @brief Stating an Assertion.
*
* @param LEVEL is the level of the assertion of type @ref diagnostics::Level_t
* @param NR_WHAT is a client-specific numerical field.
* @param STR_WHAT is a client-specific string field.
* @param COND The condition which to be asserted. This condition will
* be evaluated exactly once.
*
* @param ACTION can be statement (not entailed by a semi-colon) which
* has to be executed in the case of a failing assertion.
*/
#define DIAGNOSTICS_BASE_ASSERT(LEVEL,NR_WHAT,STR_WHAT,COND,ACTION) \
do { if(!(COND)) { \
DIAGNOSTICS_BASE_LOG((LEVEL),::diagnostics::TYPE_FAILED_ASSERTION,(NR_WHAT),(STR_WHAT)); \
ACTION; \
} \
} while(false)
#endif
// vim:ts=4:sw=4
|