COIN-OR::LEMON - Graph Library

source: lemon-0.x/test/graph_test.cc @ 1895:5b01801efbc0

Last change on this file since 1895:5b01801efbc0 was 1712:4fb435ad31cf, checked in by Balazs Dezso, 14 years ago

Little modifications

File size: 1.9 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>
[1712]10#include <lemon/hypercube_graph.h>
[567]11
[946]12#include "test_tools.h"
13#include "graph_test.h"
14#include "map_test.h"
[503]15
16
[921]17using namespace lemon;
[959]18using namespace lemon::concept;
[503]19
20
[946]21int main() {
22  { // checking graph components
[989]23    checkConcept<BaseGraphComponent, BaseGraphComponent >();
[503]24
[989]25    checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
[503]26
[989]27    checkConcept<IDableGraphComponent, IDableGraphComponent >();
28    checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
[503]29
[989]30    checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
31    checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
[503]32
[989]33    checkConcept<IterableGraphComponent, IterableGraphComponent >();
[503]34
[989]35    checkConcept<MappableGraphComponent, MappableGraphComponent >();
[793]36
[989]37    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
38    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
39    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
[946]40  }
41  { // checking skeleton graphs
[989]42    checkConcept<StaticGraph, StaticGraph >();
43    checkConcept<ExtendableGraph, ExtendableGraph >();
44    checkConcept<ErasableGraph, ErasableGraph >();
[946]45  }
46  { // checking list graph
[989]47    checkConcept<ErasableGraph, ListGraph >();
[793]48
[946]49    checkGraph<ListGraph>();
50    checkGraphNodeMap<ListGraph>();
51    checkGraphEdgeMap<ListGraph>();
52  }
53  { // checking smart graph
[989]54    checkConcept<ExtendableGraph, SmartGraph >();
[733]55
[946]56    checkGraph<SmartGraph>();
57    checkGraphNodeMap<SmartGraph>();
58    checkGraphEdgeMap<SmartGraph>();
[503]59  }
[946]60  { // checking full graph
[989]61    checkConcept<StaticGraph, FullGraph >();
[578]62  }
[1712]63  { // checking full graph
64    checkConcept<StaticGraph, HyperCubeGraph >();
65  }
[503]66
67  std::cout << __FILE__ ": All tests passed.\n";
68
[579]69  return 0;
[503]70}
Note: See TracBrowser for help on using the repository browser.