test/digraph_test.cc
changeset 1200 73bd8d5200df
parent 1092 dceba191c00d
     1.1 --- a/test/digraph_test.cc	Sun Aug 17 15:02:03 2008 +0200
     1.2 +++ b/test/digraph_test.cc	Sun Mar 19 14:38:08 2017 +0100
     1.3 @@ -20,6 +20,7 @@
     1.4  #include <lemon/list_graph.h>
     1.5  #include <lemon/smart_graph.h>
     1.6  #include <lemon/static_graph.h>
     1.7 +#include <lemon/compact_graph.h>
     1.8  #include <lemon/full_graph.h>
     1.9  
    1.10  #include "test_tools.h"
    1.11 @@ -338,6 +339,10 @@
    1.12      checkConcept<Digraph, StaticDigraph>();
    1.13      checkConcept<ClearableDigraphComponent<>, StaticDigraph>();
    1.14    }
    1.15 +  { // Checking CompactDigraph
    1.16 +    checkConcept<Digraph, CompactDigraph>();
    1.17 +    checkConcept<ClearableDigraphComponent<>, CompactDigraph>();
    1.18 +  }
    1.19    { // Checking FullDigraph
    1.20      checkConcept<Digraph, FullDigraph>();
    1.21    }
    1.22 @@ -394,12 +399,13 @@
    1.23    check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
    1.24  }
    1.25  
    1.26 +template <typename GR>
    1.27  void checkStaticDigraph() {
    1.28    SmartDigraph g;
    1.29 -  SmartDigraph::NodeMap<StaticDigraph::Node> nref(g);
    1.30 -  SmartDigraph::ArcMap<StaticDigraph::Arc> aref(g);
    1.31 +  SmartDigraph::NodeMap<typename GR::Node> nref(g);
    1.32 +  SmartDigraph::ArcMap<typename GR::Arc> aref(g);
    1.33  
    1.34 -  StaticDigraph G;
    1.35 +  GR G;
    1.36  
    1.37    checkGraphNodeList(G, 0);
    1.38    checkGraphArcList(G, 0);
    1.39 @@ -555,7 +561,8 @@
    1.40      checkDigraphValidity<SmartDigraph>();
    1.41    }
    1.42    { // Checking StaticDigraph
    1.43 -    checkStaticDigraph();
    1.44 +    checkStaticDigraph<StaticDigraph>();
    1.45 +    checkStaticDigraph<CompactDigraph>();
    1.46    }
    1.47    { // Checking FullDigraph
    1.48      checkFullDigraph(8);