COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/graph_test.cc @ 989:ca95f8b5c931

Last change on this file since 989:ca95f8b5c931 was 989:ca95f8b5c931, checked in by Balazs Dezso, 20 years ago

XyzConcept? moved to Xyz::Constraints
use checkConcept in the next way:

checkConcept<ErasableGraph?, ListGraph?>();
checkConcept<ReadWriteMap?<Node, Node>, PredMap?>;

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>
[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
[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 >();
32    checkConcept<BaseClearableGraphComponent, BaseClearableGraphComponent >();
[503]33
[989]34    checkConcept<IterableGraphComponent, IterableGraphComponent >();
[503]35
[989]36    checkConcept<MappableGraphComponent, MappableGraphComponent >();
[793]37
[989]38    checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
39    checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
40    checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
[946]41  }
42  { // checking skeleton graphs
[989]43    checkConcept<StaticGraph, StaticGraph >();
44    checkConcept<ExtendableGraph, ExtendableGraph >();
45    checkConcept<ErasableGraph, ErasableGraph >();
[946]46  }
47  { // checking list graph
[989]48    checkConcept<ErasableGraph, ListGraph >();
[793]49
[946]50    checkGraph<ListGraph>();
51    checkGraphNodeMap<ListGraph>();
52    checkGraphEdgeMap<ListGraph>();
53  }
54  { // checking smart graph
[989]55    checkConcept<ExtendableGraph, SmartGraph >();
[733]56
[946]57    checkGraph<SmartGraph>();
58    checkGraphNodeMap<SmartGraph>();
59    checkGraphEdgeMap<SmartGraph>();
[503]60  }
[946]61  { // checking full graph
[989]62    checkConcept<StaticGraph, 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.