test/graph_test.cc
author ladanyi
Tue, 12 Jul 2005 13:36:01 +0000
changeset 1545 e8378402f97e
parent 1043 52a2201a88e9
child 1712 4fb435ad31cf
permissions -rw-r--r--
Added the individual png files to EXTRA_DIST instead of the icons directory. This way the .svn directories do not get in the tarball. An alternative solution would be to delete these in a dist-hook target.
     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   { // checking graph components
    22     checkConcept<BaseGraphComponent, BaseGraphComponent >();
    23 
    24     checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
    25 
    26     checkConcept<IDableGraphComponent, IDableGraphComponent >();
    27     checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
    28 
    29     checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
    30     checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
    31 
    32     checkConcept<IterableGraphComponent, IterableGraphComponent >();
    33 
    34     checkConcept<MappableGraphComponent, MappableGraphComponent >();
    35 
    36     checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
    37     checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
    38     checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
    39   }
    40   { // checking skeleton graphs
    41     checkConcept<StaticGraph, StaticGraph >();
    42     checkConcept<ExtendableGraph, ExtendableGraph >();
    43     checkConcept<ErasableGraph, ErasableGraph >();
    44   }
    45   { // checking list graph
    46     checkConcept<ErasableGraph, ListGraph >();
    47 
    48     checkGraph<ListGraph>();
    49     checkGraphNodeMap<ListGraph>();
    50     checkGraphEdgeMap<ListGraph>();
    51   }
    52   { // checking smart graph
    53     checkConcept<ExtendableGraph, SmartGraph >();
    54 
    55     checkGraph<SmartGraph>();
    56     checkGraphNodeMap<SmartGraph>();
    57     checkGraphEdgeMap<SmartGraph>();
    58   }
    59   { // checking full graph
    60     checkConcept<StaticGraph, FullGraph >();
    61   }
    62 
    63   std::cout << __FILE__ ": All tests passed.\n";
    64 
    65   return 0;
    66 }