src/test/graph_test.cc
author klao
Thu, 25 Nov 2004 14:48:24 +0000
changeset 1021 fd1d073b6557
parent 980 0f1044b7a3af
child 1022 567f392d1d2e
permissions -rw-r--r--
Advances in UndirGraph.
* IterableExtender is complete
     1 // -*- c++ -*-
     2 
     3 #include <iostream>
     4 #include <vector>
     5 
     6 #include <lemon/concept/graph.h>
     7 #include <lemon/list_graph.h>
     8 #include <lemon/smart_graph.h>
     9 #include <lemon/full_graph.h>
    10 
    11 #include "test_tools.h"
    12 #include "graph_test.h"
    13 #include "map_test.h"
    14 
    15 
    16 using namespace lemon;
    17 using namespace lemon::concept;
    18 
    19 
    20 int main() {
    21   ///\file
    22   { // checking graph components
    23     checkConcept<BaseGraphComponent, BaseGraphComponent >();
    24 
    25     checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
    26 
    27     checkConcept<IDableGraphComponent, IDableGraphComponent >();
    28     checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
    29 
    30     checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
    31     checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
    32     checkConcept<BaseClearableGraphComponent, BaseClearableGraphComponent >();
    33 
    34     checkConcept<IterableGraphComponent, IterableGraphComponent >();
    35 
    36     checkConcept<MappableGraphComponent, MappableGraphComponent >();
    37 
    38     checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
    39     checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
    40     checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
    41   }
    42   { // checking skeleton graphs
    43     checkConcept<StaticGraph, StaticGraph >();
    44     checkConcept<ExtendableGraph, ExtendableGraph >();
    45     checkConcept<ErasableGraph, ErasableGraph >();
    46   }
    47   { // checking list graph
    48     checkConcept<ErasableGraph, ListGraph >();
    49 
    50     checkGraph<ListGraph>();
    51     checkGraphNodeMap<ListGraph>();
    52     checkGraphEdgeMap<ListGraph>();
    53   }
    54   { // checking smart graph
    55     checkConcept<ExtendableGraph, SmartGraph >();
    56 
    57     checkGraph<SmartGraph>();
    58     checkGraphNodeMap<SmartGraph>();
    59     checkGraphEdgeMap<SmartGraph>();
    60   }
    61   { // checking full graph
    62     checkConcept<StaticGraph, FullGraph >();
    63   }
    64 
    65   std::cout << __FILE__ ": All tests passed.\n";
    66 
    67   return 0;
    68 }