COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/graph_copy_test.cc

    r416 r282  
    3030  const int nn = 10;
    3131
    32   // Build a digraph
    3332  SmartDigraph from;
    3433  SmartDigraph::NodeMap<int> fnm(from);
     
    5352  }
    5453
    55   // Test digraph copy
    5654  ListDigraph to;
    5755  ListDigraph::NodeMap<int> tnm(to);
     
    7169    nodeCrossRef(ncr).arcCrossRef(ecr).
    7270    node(fn, tn).arc(fa, ta).run();
    73  
    74   check(countNodes(from) == countNodes(to), "Wrong copy.");
    75   check(countArcs(from) == countArcs(to), "Wrong copy.");
    7671
    7772  for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) {
     
    9691  check(tn == nr[fn], "Wrong copy.");
    9792  check(ta == er[fa], "Wrong copy.");
    98 
    99   // Test repeated copy
    100   digraphCopy(from, to).run();
    101  
    102   check(countNodes(from) == countNodes(to), "Wrong copy.");
    103   check(countArcs(from) == countArcs(to), "Wrong copy.");
    10493}
    10594
     
    10796  const int nn = 10;
    10897
    109   // Build a graph
    11098  SmartGraph from;
    11199  SmartGraph::NodeMap<int> fnm(from);
     
    135123  }
    136124
    137   // Test graph copy
    138125  ListGraph to;
    139126  ListGraph::NodeMap<int> tnm(to);
     
    157144    nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr).
    158145    node(fn, tn).arc(fa, ta).edge(fe, te).run();
    159 
    160   check(countNodes(from) == countNodes(to), "Wrong copy.");
    161   check(countEdges(from) == countEdges(to), "Wrong copy.");
    162   check(countArcs(from) == countArcs(to), "Wrong copy.");
    163146
    164147  for (SmartGraph::NodeIt it(from); it != INVALID; ++it) {
     
    198181  check(ta == ar[fa], "Wrong copy.");
    199182  check(te == er[fe], "Wrong copy.");
    200 
    201   // Test repeated copy
    202   graphCopy(from, to).run();
    203  
    204   check(countNodes(from) == countNodes(to), "Wrong copy.");
    205   check(countEdges(from) == countEdges(to), "Wrong copy.");
    206   check(countArcs(from) == countArcs(to), "Wrong copy.");
    207183}
    208184
Note: See TracChangeset for help on using the changeset viewer.