test_tools.h File Reference


Detailed Description

Definition in file test_tools.h.#include <iostream>
#include <vector>

Include dependency graph for test_tools.h:

Include dependency graph

Go to the source code of this file.

Classes

struct  PetStruct
 Structure returned by addPetersen(). More...

Defines

#define check(rc, msg)
 If rc is fail, writes an error message end exit.

Functions

template<typename Graph> PetStruct< Graph > addPetersen (Graph &G, int num=5)
 Adds a Petersen graph to G.


Define Documentation

#define check rc,
msg   ) 
 

Value:

if(!(rc)) { \ std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \ exit(1); \ } else { } \
If rc is fail, writes an error message end exit. The error message contains the file name and the line number of the source code in a standard from, which makes it possible to go there using good source browsers like e.g. emacs.

For example

 check(0==1,"This is obviously false.");
will print this (and then exits).
 graph_test.cc:123: error: This is obviously false. 

Todo:
It should be in error.h
Definition at line 41 of file test_tools.h.


Function Documentation

PetStruct<Graph> addPetersen Graph &  G,
int  num = 5
 

Adds a Petersen graph to G.

Returns:
The nodes end edges og the generated graph.
Definition at line 73 of file test_tools.h.

References PetStruct::chords, PetStruct::incir, PetStruct::inner, PetStruct::outcir, and PetStruct::outer.


Generated on Thu Sep 30 12:18:36 2004 for LEMON by doxygen 1.3.8