test/connectivity_test.cc
changeset 1262 dd1443e4a34c
parent 1159 7fdaa05a69a1
parent 1257 3e711ee55d31
child 1268 19087d4f215d
equal deleted inserted replaced
5:a62cf59e71d9 8:64a93547ffc9
    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     ::lemon::ignore_unused_variable_warning(n);
    72 
    72 
    73     check(stronglyConnected(d), "This digraph is strongly connected");
    73     check(stronglyConnected(d), "This digraph is strongly connected");
    74     check(countStronglyConnectedComponents(d) == 1,
    74     check(countStronglyConnectedComponents(d) == 1,
    75           "This digraph has 1 strongly connected component");
    75           "This digraph has 1 strongly connected component");
    76     check(connected(g), "This graph is connected");
    76     check(connected(g), "This graph is connected");
   244     Digraph::Node socks = d.addNode();
   244     Digraph::Node socks = d.addNode();
   245     Digraph::Node shirt = d.addNode();
   245     Digraph::Node shirt = d.addNode();
   246     Digraph::Node shoe = d.addNode();
   246     Digraph::Node shoe = d.addNode();
   247     Digraph::Node watch = d.addNode();
   247     Digraph::Node watch = d.addNode();
   248     Digraph::Node pants = d.addNode();
   248     Digraph::Node pants = d.addNode();
   249     ignore_unused_variable_warning(watch);
   249     ::lemon::ignore_unused_variable_warning(watch);
   250 
   250 
   251     d.addArc(socks, shoe);
   251     d.addArc(socks, shoe);
   252     d.addArc(pants, shoe);
   252     d.addArc(pants, shoe);
   253     d.addArc(pants, trousers);
   253     d.addArc(pants, trousers);
   254     d.addArc(trousers, shoe);
   254     d.addArc(trousers, shoe);