src/test/graph_test.cc
author deba
Thu, 11 Nov 2004 10:17:20 +0000
changeset 981 2e34b796d532
parent 959 c80ef5912903
child 989 ca95f8b5c931
permissions -rw-r--r--
maxUndirEdgeId modified to maxId(UndirEdge)
maxEdgeId modified to maxId(Edge)
     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     function_requires<BaseGraphComponentConcept<BaseGraphComponent> >();
    24 
    25     function_requires<BaseIterableGraphComponentConcept<BaseIterableGraphComponent> >();
    26 
    27     function_requires<IDableGraphComponentConcept<IDableGraphComponent> >();
    28     function_requires<MaxIDableGraphComponentConcept<MaxIDableGraphComponent> >();
    29 
    30     function_requires<BaseExtendableGraphComponentConcept<BaseExtendableGraphComponent> >();
    31     function_requires<BaseErasableGraphComponentConcept<BaseErasableGraphComponent> >();
    32     function_requires<BaseClearableGraphComponentConcept<BaseClearableGraphComponent> >();
    33 
    34     function_requires<IterableGraphComponentConcept<IterableGraphComponent> >();
    35 
    36     function_requires<MappableGraphComponentConcept<MappableGraphComponent> >();
    37 
    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> >();
    49 
    50     checkGraph<ListGraph>();
    51     checkGraphNodeMap<ListGraph>();
    52     checkGraphEdgeMap<ListGraph>();
    53   }
    54   { // checking smart graph
    55     function_requires<ExtendableGraphConcept<SmartGraph> >();
    56 
    57     checkGraph<SmartGraph>();
    58     checkGraphNodeMap<SmartGraph>();
    59     checkGraphEdgeMap<SmartGraph>();
    60   }
    61   { // checking full graph
    62     function_requires<StaticGraphConcept<FullGraph> >();
    63   }
    64 
    65   std::cout << __FILE__ ": All tests passed.\n";
    66 
    67   return 0;
    68 }