diff -r d8475431bbbb -r 8e85e6bbefdf test/graph_test.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/graph_test.h Mon May 23 04:48:14 2005 +0000 @@ -0,0 +1,90 @@ +/* -*- C++ -*- + * test/graph_test.h - Part of LEMON, a generic C++ optimization library + * + * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Research Group on Combinatorial Optimization, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ +#ifndef LEMON_TEST_GRAPH_TEST_H +#define LEMON_TEST_GRAPH_TEST_H + + +#include "test_tools.h" + +//! \ingroup misc +//! \file +//! \brief Some utility and test cases to test graph classes. +namespace lemon { + + template void checkGraphNodeList(Graph &G, int nn) + { + typename Graph::NodeIt n(G); + for(int i=0;i + void checkGraphEdgeList(Graph &G, int nn) + { + typedef typename Graph::EdgeIt EdgeIt; + + EdgeIt e(G); + for(int i=0;i + void checkGraphOutEdgeList(Graph &G, typename Graph::Node n, int nn) + { + typename Graph::OutEdgeIt e(G,n); + for(int i=0;i void + checkGraphInEdgeList(Graph &G, typename Graph::Node n, int nn) + { + typename Graph::InEdgeIt e(G,n); + for(int i=0;i + void checkGraph() { + const int num = 5; + Graph G; + addPetersen(G, num); + bidirGraph(G); + checkBidirPetersen(G, num); + } + + ///\file + ///\todo Check target(), source() as well; + + +} //namespace lemon + + +#endif