/* -*- C++ -*- * test/sym_graph_test.cc - 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. * */ #include #include #include #include #include #include"test_tools.h" #include"graph_test.h" #include"sym_graph_test.h" /** \file This test makes consistency checks of list graph structures. G.addNode(), G.addEdge(), G.source(), G.target() \todo Checks for empty graphs and isolated points. conversion. */ using namespace lemon; template void checkPetersen(Graph &G) { typedef typename Graph::NodeIt NodeIt; checkGraphNodeList(G,10); checkGraphEdgeList(G,30); checkGraphSymEdgeList(G,15); for(NodeIt n(G);n!=INVALID;++n) { checkGraphInEdgeList(G,n,3); checkGraphOutEdgeList(G,n,3); } } //Compile Graph template void lemon::checkCompileStaticSymGraph (concept::StaticSymGraph &); template void lemon::checkCompileSymGraph (concept::ExtendableSymGraph &); template void lemon::checkCompileErasableSymGraph (concept::ErasableSymGraph &); //Compile SymSmartGraph template void lemon::checkCompileSymGraph(SymSmartGraph &); template void lemon::concept::checkCompileGraphFindEdge(SymSmartGraph &); //Compile SymListGraph template void lemon::checkCompileSymGraph(SymListGraph &); template void lemon::checkCompileErasableSymGraph(SymListGraph &); template void lemon::concept::checkCompileGraphFindEdge(SymListGraph &); int main() { { SymSmartGraph G; addSymPetersen(G); checkPetersen(G); } { SymListGraph G; addSymPetersen(G); checkPetersen(G); } ///\file ///\todo map tests. ///\todo copy constr tests. std::cout << __FILE__ ": All tests passed.\n"; return 0; }