test/edge_set_test.cc
changeset 1015 d32e4453b48c
parent 488 9b9ffe7d9b75
child 998 7fdaa05a69a1
child 1083 3e711ee55d31
equal deleted inserted replaced
1:2ffc16c07960 3:d8fa533207ae
    42   Digraph::Node
    42   Digraph::Node
    43     n1 = digraph.addNode(),
    43     n1 = digraph.addNode(),
    44     n2 = digraph.addNode();
    44     n2 = digraph.addNode();
    45 
    45 
    46   Digraph::Arc ga1 = digraph.addArc(n1, n2);
    46   Digraph::Arc ga1 = digraph.addArc(n1, n2);
       
    47   ignore_unused_variable_warning(ga1);
    47 
    48 
    48   ArcSet arc_set(digraph);
    49   ArcSet arc_set(digraph);
    49 
    50 
    50   Digraph::Arc ga2 = digraph.addArc(n2, n1);
    51   Digraph::Arc ga2 = digraph.addArc(n2, n1);
       
    52   ignore_unused_variable_warning(ga2);
    51 
    53 
    52   checkGraphNodeList(arc_set, 2);
    54   checkGraphNodeList(arc_set, 2);
    53   checkGraphArcList(arc_set, 0);
    55   checkGraphArcList(arc_set, 0);
    54 
    56 
    55   Digraph::Node
    57   Digraph::Node
    73   checkGraphConArcList(arc_set, 1);
    75   checkGraphConArcList(arc_set, 1);
    74 
    76 
    75   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
    77   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
    76     a3 = arc_set.addArc(n2, n3),
    78     a3 = arc_set.addArc(n2, n3),
    77     a4 = arc_set.addArc(n2, n3);
    79     a4 = arc_set.addArc(n2, n3);
       
    80   ignore_unused_variable_warning(a2,a3,a4);
       
    81 
    78   checkGraphNodeList(arc_set, 3);
    82   checkGraphNodeList(arc_set, 3);
    79   checkGraphArcList(arc_set, 4);
    83   checkGraphArcList(arc_set, 4);
    80 
    84 
    81   checkGraphOutArcList(arc_set, n1, 1);
    85   checkGraphOutArcList(arc_set, n1, 1);
    82   checkGraphOutArcList(arc_set, n2, 3);
    86   checkGraphOutArcList(arc_set, n2, 3);
   108   Digraph::Node
   112   Digraph::Node
   109     n1 = digraph.addNode(),
   113     n1 = digraph.addNode(),
   110     n2 = digraph.addNode();
   114     n2 = digraph.addNode();
   111 
   115 
   112   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   116   Digraph::Arc ga1 = digraph.addArc(n1, n2);
       
   117   ignore_unused_variable_warning(ga1);
   113 
   118 
   114   ArcSet arc_set(digraph);
   119   ArcSet arc_set(digraph);
   115 
   120 
   116   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   121   Digraph::Arc ga2 = digraph.addArc(n2, n1);
       
   122   ignore_unused_variable_warning(ga2);
   117 
   123 
   118   checkGraphNodeList(arc_set, 2);
   124   checkGraphNodeList(arc_set, 2);
   119   checkGraphArcList(arc_set, 0);
   125   checkGraphArcList(arc_set, 0);
   120 
   126 
   121   Digraph::Node
   127   Digraph::Node
   139   checkGraphConArcList(arc_set, 1);
   145   checkGraphConArcList(arc_set, 1);
   140 
   146 
   141   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
   147   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
   142     a3 = arc_set.addArc(n2, n3),
   148     a3 = arc_set.addArc(n2, n3),
   143     a4 = arc_set.addArc(n2, n3);
   149     a4 = arc_set.addArc(n2, n3);
       
   150   ignore_unused_variable_warning(a2,a3,a4);
       
   151 
   144   checkGraphNodeList(arc_set, 3);
   152   checkGraphNodeList(arc_set, 3);
   145   checkGraphArcList(arc_set, 4);
   153   checkGraphArcList(arc_set, 4);
   146 
   154 
   147   checkGraphOutArcList(arc_set, n1, 1);
   155   checkGraphOutArcList(arc_set, n1, 1);
   148   checkGraphOutArcList(arc_set, n2, 3);
   156   checkGraphOutArcList(arc_set, n2, 3);
   188   Digraph::Node
   196   Digraph::Node
   189     n1 = digraph.addNode(),
   197     n1 = digraph.addNode(),
   190     n2 = digraph.addNode();
   198     n2 = digraph.addNode();
   191 
   199 
   192   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   200   Digraph::Arc ga1 = digraph.addArc(n1, n2);
       
   201   ignore_unused_variable_warning(ga1);
   193 
   202 
   194   EdgeSet edge_set(digraph);
   203   EdgeSet edge_set(digraph);
   195 
   204 
   196   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   205   Digraph::Arc ga2 = digraph.addArc(n2, n1);
       
   206   ignore_unused_variable_warning(ga2);
   197 
   207 
   198   checkGraphNodeList(edge_set, 2);
   208   checkGraphNodeList(edge_set, 2);
   199   checkGraphArcList(edge_set, 0);
   209   checkGraphArcList(edge_set, 0);
   200   checkGraphEdgeList(edge_set, 0);
   210   checkGraphEdgeList(edge_set, 0);
   201 
   211 
   228   checkGraphConArcList(edge_set, 2);
   238   checkGraphConArcList(edge_set, 2);
   229 
   239 
   230   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   240   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   231     e3 = edge_set.addEdge(n2, n3),
   241     e3 = edge_set.addEdge(n2, n3),
   232     e4 = edge_set.addEdge(n2, n3);
   242     e4 = edge_set.addEdge(n2, n3);
       
   243   ignore_unused_variable_warning(e2,e3,e4);
       
   244 
   233   checkGraphNodeList(edge_set, 3);
   245   checkGraphNodeList(edge_set, 3);
   234   checkGraphEdgeList(edge_set, 4);
   246   checkGraphEdgeList(edge_set, 4);
   235 
   247 
   236   checkGraphOutArcList(edge_set, n1, 2);
   248   checkGraphOutArcList(edge_set, n1, 2);
   237   checkGraphOutArcList(edge_set, n2, 4);
   249   checkGraphOutArcList(edge_set, n2, 4);
   272   Digraph::Node
   284   Digraph::Node
   273     n1 = digraph.addNode(),
   285     n1 = digraph.addNode(),
   274     n2 = digraph.addNode();
   286     n2 = digraph.addNode();
   275 
   287 
   276   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   288   Digraph::Arc ga1 = digraph.addArc(n1, n2);
       
   289   ignore_unused_variable_warning(ga1);
   277 
   290 
   278   EdgeSet edge_set(digraph);
   291   EdgeSet edge_set(digraph);
   279 
   292 
   280   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   293   Digraph::Arc ga2 = digraph.addArc(n2, n1);
       
   294   ignore_unused_variable_warning(ga2);
   281 
   295 
   282   checkGraphNodeList(edge_set, 2);
   296   checkGraphNodeList(edge_set, 2);
   283   checkGraphArcList(edge_set, 0);
   297   checkGraphArcList(edge_set, 0);
   284   checkGraphEdgeList(edge_set, 0);
   298   checkGraphEdgeList(edge_set, 0);
   285 
   299 
   312   checkGraphConArcList(edge_set, 2);
   326   checkGraphConArcList(edge_set, 2);
   313 
   327 
   314   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   328   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   315     e3 = edge_set.addEdge(n2, n3),
   329     e3 = edge_set.addEdge(n2, n3),
   316     e4 = edge_set.addEdge(n2, n3);
   330     e4 = edge_set.addEdge(n2, n3);
       
   331   ignore_unused_variable_warning(e2,e3,e4);
       
   332 
   317   checkGraphNodeList(edge_set, 3);
   333   checkGraphNodeList(edge_set, 3);
   318   checkGraphEdgeList(edge_set, 4);
   334   checkGraphEdgeList(edge_set, 4);
   319 
   335 
   320   checkGraphOutArcList(edge_set, n1, 2);
   336   checkGraphOutArcList(edge_set, n1, 2);
   321   checkGraphOutArcList(edge_set, n2, 4);
   337   checkGraphOutArcList(edge_set, n2, 4);