/* -*- C++ -*- * src/test/graph_test.h - Part of LEMON, a generic C++ optimization library * * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Combinatorial Optimization Research Group, 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