COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/graph_test.cc @ 986:e997802b855c

Last change on this file since 986:e997802b855c was 980:0f1044b7a3af, checked in by Balazs Dezso, 20 years ago

maxNodeId() and maxEdgeId() changed to maxId(Node) and maxId(Edge)
getNodeObserverRegistry() and getEdgeObserverRegistry() changed to
getObserverRegistry(Node) and getObserverRegistry(Edge)

IdMappableGraphExtender? erased

File size: 2.1 KB
RevLine 
[946]1// -*- c++ -*-
[906]2
[946]3#include <iostream>
4#include <vector>
[578]5
[959]6#include <lemon/concept/graph.h>
[946]7#include <lemon/list_graph.h>
8#include <lemon/smart_graph.h>
9#include <lemon/full_graph.h>
[567]10
[946]11#include "test_tools.h"
12#include "graph_test.h"
13#include "map_test.h"
[503]14
15
[921]16using namespace lemon;
[959]17using namespace lemon::concept;
[503]18
19
[946]20int main() {
21  ///\file
22  { // checking graph components
23    function_requires<BaseGraphComponentConcept<BaseGraphComponent> >();
[503]24
[946]25    function_requires<BaseIterableGraphComponentConcept<BaseIterableGraphComponent> >();
[503]26
[946]27    function_requires<IDableGraphComponentConcept<IDableGraphComponent> >();
28    function_requires<MaxIDableGraphComponentConcept<MaxIDableGraphComponent> >();
[503]29
[946]30    function_requires<BaseExtendableGraphComponentConcept<BaseExtendableGraphComponent> >();
31    function_requires<BaseErasableGraphComponentConcept<BaseErasableGraphComponent> >();
32    function_requires<BaseClearableGraphComponentConcept<BaseClearableGraphComponent> >();
[503]33
[946]34    function_requires<IterableGraphComponentConcept<IterableGraphComponent> >();
[503]35
[946]36    function_requires<MappableGraphComponentConcept<MappableGraphComponent> >();
[793]37
[946]38    function_requires<ExtendableGraphComponentConcept<ExtendableGraphComponent> >();
39    function_requires<ErasableGraphComponentConcept<ErasableGraphComponent> >();
40    function_requires<ClearableGraphComponentConcept<ClearableGraphComponent> >();
41  }
42  { // checking skeleton graphs
43    function_requires<StaticGraphConcept<StaticGraph> >();
44    function_requires<ExtendableGraphConcept<ExtendableGraph> >();
45    function_requires<ErasableGraphConcept<ErasableGraph> >();
46  }
47  { // checking list graph
48    function_requires<ErasableGraphConcept<ListGraph> >();
[793]49
[946]50    checkGraph<ListGraph>();
51    checkGraphNodeMap<ListGraph>();
52    checkGraphEdgeMap<ListGraph>();
53  }
54  { // checking smart graph
55    function_requires<ExtendableGraphConcept<SmartGraph> >();
[733]56
[946]57    checkGraph<SmartGraph>();
58    checkGraphNodeMap<SmartGraph>();
59    checkGraphEdgeMap<SmartGraph>();
[503]60  }
[946]61  { // checking full graph
62    function_requires<StaticGraphConcept<FullGraph> >();
[578]63  }
[503]64
65  std::cout << __FILE__ ": All tests passed.\n";
66
[579]67  return 0;
[503]68}
Note: See TracBrowser for help on using the repository browser.