test/connectivity_test.cc
changeset 1052 eb2f9d453070
parent 877 141f9c0db4a3
parent 997 761fe0846f49
child 1084 8b2d4e5d96e4
equal deleted inserted replaced
1:3f048f474d89 3:a62cf59e71d9
    66   {
    66   {
    67     Digraph d;
    67     Digraph d;
    68     Digraph::NodeMap<int> order(d);
    68     Digraph::NodeMap<int> order(d);
    69     Graph g(d);
    69     Graph g(d);
    70     Digraph::Node n = d.addNode();
    70     Digraph::Node n = d.addNode();
       
    71     ignore_unused_variable_warning(n);
    71 
    72 
    72     check(stronglyConnected(d), "This digraph is strongly connected");
    73     check(stronglyConnected(d), "This digraph is strongly connected");
    73     check(countStronglyConnectedComponents(d) == 1,
    74     check(countStronglyConnectedComponents(d) == 1,
    74           "This digraph has 1 strongly connected component");
    75           "This digraph has 1 strongly connected component");
    75     check(connected(g), "This graph is connected");
    76     check(connected(g), "This graph is connected");
   243     Digraph::Node socks = d.addNode();
   244     Digraph::Node socks = d.addNode();
   244     Digraph::Node shirt = d.addNode();
   245     Digraph::Node shirt = d.addNode();
   245     Digraph::Node shoe = d.addNode();
   246     Digraph::Node shoe = d.addNode();
   246     Digraph::Node watch = d.addNode();
   247     Digraph::Node watch = d.addNode();
   247     Digraph::Node pants = d.addNode();
   248     Digraph::Node pants = d.addNode();
       
   249     ignore_unused_variable_warning(watch);
   248 
   250 
   249     d.addArc(socks, shoe);
   251     d.addArc(socks, shoe);
   250     d.addArc(pants, shoe);
   252     d.addArc(pants, shoe);
   251     d.addArc(pants, trousers);
   253     d.addArc(pants, trousers);
   252     d.addArc(trousers, shoe);
   254     d.addArc(trousers, shoe);