test/connectivity_test.cc
branch1.1
changeset 1168 b78a46fe8002
parent 1081 f1398882a928
parent 1157 761fe0846f49
child 1258 bdfc038f364c
equal deleted inserted replaced
2:ad69b0031e77 4:f7b5771b1e68
    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);