test/digraph_test.cc
changeset 83 3654324ec035
child 107 31a2e6d28f61
equal deleted inserted replaced
-1:000000000000 0:0242cf85d650
       
     1 /* -*- C++ -*-
       
     2  *
       
     3  * This file is a part of LEMON, a generic C++ optimization library
       
     4  *
       
     5  * Copyright (C) 2003-2007
       
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
       
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
       
     8  *
       
     9  * Permission to use, modify and distribute this software is granted
       
    10  * provided that this copyright notice appears in all copies. For
       
    11  * precise terms see the accompanying LICENSE file.
       
    12  *
       
    13  * This software is provided "AS IS" with no warranty of any kind,
       
    14  * express or implied, and with no claim as to its suitability for any
       
    15  * purpose.
       
    16  *
       
    17  */
       
    18 
       
    19 #include <iostream>
       
    20 #include <vector>
       
    21 
       
    22 #include <lemon/concepts/digraph.h>
       
    23 #include <lemon/list_graph.h>
       
    24 //#include <lemon/smart_graph.h>
       
    25 //#include <lemon/full_graph.h>
       
    26 //#include <lemon/hypercube_graph.h>
       
    27 
       
    28 #include "test_tools.h"
       
    29 #include "digraph_test.h"
       
    30 #include "map_test.h"
       
    31 
       
    32 
       
    33 using namespace lemon;
       
    34 using namespace lemon::concepts;
       
    35 
       
    36 
       
    37 int main() {
       
    38   { // checking digraph components
       
    39     checkConcept<BaseDigraphComponent, BaseDigraphComponent >();
       
    40 
       
    41     checkConcept<IDableDigraphComponent<>, 
       
    42       IDableDigraphComponent<> >();
       
    43 
       
    44     checkConcept<IterableDigraphComponent<>, 
       
    45       IterableDigraphComponent<> >();
       
    46 
       
    47     checkConcept<MappableDigraphComponent<>, 
       
    48       MappableDigraphComponent<> >();
       
    49 
       
    50   }
       
    51   { // checking skeleton digraphs
       
    52     checkConcept<Digraph, Digraph>();
       
    53   }
       
    54   { // checking list digraph
       
    55     checkConcept<Digraph, ListDigraph >();
       
    56     checkConcept<AlterableDigraphComponent<>, ListDigraph>();
       
    57     checkConcept<ExtendableDigraphComponent<>, ListDigraph>();
       
    58     checkConcept<ClearableDigraphComponent<>, ListDigraph>();
       
    59     checkConcept<ErasableDigraphComponent<>, ListDigraph>();
       
    60 
       
    61     checkDigraph<ListDigraph>();
       
    62     checkGraphNodeMap<ListDigraph>();
       
    63     checkGraphArcMap<ListDigraph>();
       
    64   }
       
    65 //   { // checking smart digraph
       
    66 //     checkConcept<Digraph, SmartDigraph >();
       
    67 
       
    68 //     checkDigraph<SmartDigraph>();
       
    69 //     checkDigraphNodeMap<SmartDigraph>();
       
    70 //     checkDigraphArcMap<SmartDigraph>();
       
    71 //   }
       
    72 //   { // checking full digraph
       
    73 //     checkConcept<Digraph, FullDigraph >();
       
    74 //   }
       
    75 //   { // checking full digraph
       
    76 //     checkConcept<Digraph, HyperCubeDigraph >();
       
    77 //   }
       
    78 
       
    79   std::cout << __FILE__ ": All tests passed.\n";
       
    80 
       
    81   return 0;
       
    82 }