Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

assert_pp.h File Reference


Detailed Description

Provides require/ensure macros for testing preconditions and postconditions.

Include dependency graph for assert_pp.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define ASSERT_FUNCATTR_NORETURN
#define pp_decl(decl)   decl
#define pp_block(block)   block
#define require(precon)
 Require an expression to be true.

#define ensure(postcon)
 Ensure an expression to be true.


Functions

int pp_failed (char *file, unsigned int line, const char *func, char *type, char *expr) ASSERT_FUNCATTR_NORETURN
 The routine which prints failure messages and aborts the program.


Define Documentation

#define ensure postcon   ) 
 

Value:

((void)((postcon) ? 0 : \
                (pp_failed(__FILE__,__LINE__,__PRETTY_FUNCTION__,"postcondition",__STRING(postcon)))))
Ensure an expression to be true.

If the expression turns out to be false, pp_failed is called with the location of this use of require.

See also:
assert
Parameters:
precon The expression to test.

#define require precon   ) 
 

Value:

((void)((precon) ? 0 : \
                (pp_failed(__FILE__,__LINE__,__PRETTY_FUNCTION__,"precondition",__STRING(precon)))))
Require an expression to be true.

If the expression turns out to be false, pp_failed is called with the location of this use of require.

See also:
assert
Parameters:
precon The expression to test.


Function Documentation

int pp_failed char *  file,
unsigned int  line,
const char *  func,
char *  type,
char *  expr
 

The routine which prints failure messages and aborts the program.

Defined in misc/src/assert_pp.c.

Parameters:
file The file name containing the condition.
line The line number containing the condition.
func The name of the function containing the condition.
type Type of condition.
expr The stringified expression that failed.
Returns:
Doesn't.


Generated on Mon Dec 1 16:21:58 2003 for CPUBroker by doxygen 1.3.4