test/connectivity_test.cc
changeset 1247 115031ac8001
parent 696 76cbcb3e9bbb
child 1158 8d2e55fac752
child 1159 7fdaa05a69a1
child 1257 3e711ee55d31
equal deleted inserted replaced
0:b6ca28e27ead 3:5cc273d24c87
    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);