test/edge_set_test.cc
author deba
Wed, 06 Sep 2006 10:01:15 +0000
changeset 2200 2f2ac1b1ca1e
parent 1990 15fb7a4ea6be
child 2260 4274224f8a7d
permissions -rw-r--r--
An easy avoiding of a bug

The functional interfaces are removed.
Better solution could be a reference counted core of the io interfaces

Now it is huge work so just write that:

GraphReader<ListGraph>(std::cin, graph).

Instead of:

graphReader(std::cin, graph).
     1 // -*- c++ -*-
     2 
     3 #include <iostream>
     4 #include <vector>
     5 
     6 #include <lemon/concept/graph.h>
     7 #include <lemon/concept/ugraph.h>
     8 #include <lemon/smart_graph.h>
     9 
    10 #include <lemon/edge_set.h>
    11 
    12 #include "test_tools.h"
    13 #include "graph_test.h"
    14 #include "map_test.h"
    15 
    16 
    17 using namespace lemon;
    18 using namespace lemon::concept;
    19 
    20 typedef SmartGraph RGraph;
    21 
    22 int main() {
    23   { // checking edge_sets
    24     checkConcept<Graph, ListEdgeSet<RGraph> >();
    25     checkConcept<UGraph, ListUEdgeSet<RGraph> >();
    26     checkConcept<Graph, SmartEdgeSet<RGraph> >();
    27     checkConcept<UGraph, SmartUEdgeSet<RGraph> >();
    28   }
    29 
    30   std::cout << __FILE__ ": All tests passed.\n";
    31 
    32   return 0;
    33 }