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

manager_bad.cc File Reference


Detailed Description

Test the ManagerImpl class to make sure it detects bad inputs.

Definition in file manager_bad.cc.

Include dependency graph for manager_bad.cc:

Include dependency graph

Go to the source code of this file.

Defines

#define expect_catch(BLOCK, EXCEPTION)
 Macro used to catch and possibly print out expected exceptions.


Functions

int main (int argc, char *argv[])

Variables

struct {
   int   verbose
args


Define Documentation

#define expect_catch BLOCK,
EXCEPTION   ) 
 

Value:

{                                                               \
    try                                                         \
    {                                                           \
        BLOCK;                                                  \
        ensure(0);                                              \
    }                                                           \
    catch(const EXCEPTION &_e)                                  \
    {                                                           \
        if( args.verbose )                                      \
        {                                                       \
            cerr << "Tried \""                                  \
                 << __STRING(BLOCK)                             \
                 << "\" at line "                               \
                 << __LINE__                                    \
                 << " and got expected exception \""            \
                 << _e                                          \
                 << "\""                                        \
                 << endl;                                       \
        }                                                       \
    }                                                           \
}
Macro used to catch and possibly print out expected exceptions.

Parameters:
BLOCK The block of code to execute in a try/catch.
EXCEPTION The expected exception.

Definition at line 44 of file manager_bad.cc.


Generated on Mon Dec 1 16:29:41 2003 for CPU Broker by doxygen 1.3.4