COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/graph_test.cc @ 1059:bd97feae7d90

Last change on this file since 1059:bd97feae7d90 was 1043:52a2201a88e9, checked in by Alpar Juttner, 20 years ago

Several changes in doc

File size: 1.8 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  { // checking graph components
[989]22    checkConcept<BaseGraphComponent, BaseGraphComponent >();
[503]23
[989]24    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
[503]25
[989]26    checkConcept<IDableGraphComponent, IDableGraphComponent >();
27    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
[503]28
[989]29    checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
30    checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
[503]31
[989]32    checkConcept<IterableGraphComponent, IterableGraphComponent >();
[503]33
[989]34    checkConcept<MappableGraphComponent, MappableGraphComponent >();
[793]35
[989]36    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
37    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
38    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
[946]39  }
40  { // checking skeleton graphs
[989]41    checkConcept<StaticGraph, StaticGraph >();
42    checkConcept<ExtendableGraph, ExtendableGraph >();
43    checkConcept<ErasableGraph, ErasableGraph >();
[946]44  }
45  { // checking list graph
[989]46    checkConcept<ErasableGraph, ListGraph >();
[793]47
[946]48    checkGraph<ListGraph>();
49    checkGraphNodeMap<ListGraph>();
50    checkGraphEdgeMap<ListGraph>();
51  }
52  { // checking smart graph
[989]53    checkConcept<ExtendableGraph, SmartGraph >();
[733]54
[946]55    checkGraph<SmartGraph>();
56    checkGraphNodeMap<SmartGraph>();
57    checkGraphEdgeMap<SmartGraph>();
[503]58  }
[946]59  { // checking full graph
[989]60    checkConcept<StaticGraph, FullGraph >();
[578]61  }
[503]62
63  std::cout << __FILE__ ": All tests passed.\n";
64
[579]65  return 0;
[503]66}
Note: See TracBrowser for help on using the repository browser.