test/bpgraph_test.cc
branch1.3
changeset 1293 bc0fc7384c50
parent 1270 dceba191c00d
equal deleted inserted replaced
6:8ae6502c1c71 7:0c5b79018465
    76   checkGraphConArcList(G, 2);
    76   checkGraphConArcList(G, 2);
    77 
    77 
    78   Edge
    78   Edge
    79     e2 = G.addEdge(bn1, rn1),
    79     e2 = G.addEdge(bn1, rn1),
    80     e3 = G.addEdge(rn1, bn2);
    80     e3 = G.addEdge(rn1, bn2);
       
    81   ::lemon::ignore_unused_variable_warning(e2,e3);
    81 
    82 
    82   checkGraphNodeList(G, 3);
    83   checkGraphNodeList(G, 3);
    83   checkGraphRedNodeList(G, 1);
    84   checkGraphRedNodeList(G, 1);
    84   checkGraphBlueNodeList(G, 2);
    85   checkGraphBlueNodeList(G, 2);
    85   checkGraphEdgeList(G, 3);
    86   checkGraphEdgeList(G, 3);
   117   BlueNode
   118   BlueNode
   118     n2 = G.addBlueNode(), n3 = G.addBlueNode();
   119     n2 = G.addBlueNode(), n3 = G.addBlueNode();
   119   Edge
   120   Edge
   120     e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
   121     e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
   121     e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
   122     e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
       
   123   ::lemon::ignore_unused_variable_warning(e1,e3,e4);
   122 
   124 
   123   // Check edge deletion
   125   // Check edge deletion
   124   G.erase(e2);
   126   G.erase(e2);
   125 
   127 
   126   checkGraphNodeList(G, 4);
   128   checkGraphNodeList(G, 4);
   165   BlueNode
   167   BlueNode
   166     n2 = G.addBlueNode(), n3 = G.addBlueNode();
   168     n2 = G.addBlueNode(), n3 = G.addBlueNode();
   167   Edge
   169   Edge
   168     e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
   170     e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
   169     e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
   171     e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
       
   172   ::lemon::ignore_unused_variable_warning(e1,e3,e4);
   170 
   173 
   171   G.changeRed(e2, n4);
   174   G.changeRed(e2, n4);
   172   check(G.redNode(e2) == n4, "Wrong red node");
   175   check(G.redNode(e2) == n4, "Wrong red node");
   173   check(G.blueNode(e2) == n3, "Wrong blue node");
   176   check(G.blueNode(e2) == n3, "Wrong blue node");
   174 
   177 
   217     n2 = G.addBlueNode(),
   220     n2 = G.addBlueNode(),
   218     n3 = G.addBlueNode();
   221     n3 = G.addBlueNode();
   219   Edge
   222   Edge
   220     e1 = G.addEdge(n1, n2),
   223     e1 = G.addEdge(n1, n2),
   221     e2 = G.addEdge(n1, n3);
   224     e2 = G.addEdge(n1, n3);
       
   225   ::lemon::ignore_unused_variable_warning(e1,e2);
   222 
   226 
   223   checkGraphNodeList(G, 3);
   227   checkGraphNodeList(G, 3);
   224   checkGraphRedNodeList(G, 1);
   228   checkGraphRedNodeList(G, 1);
   225   checkGraphBlueNodeList(G, 2);
   229   checkGraphBlueNodeList(G, 2);
   226   checkGraphEdgeList(G, 2);
   230   checkGraphEdgeList(G, 2);
   302     n3 = g.addBlueNode();
   306     n3 = g.addBlueNode();
   303 
   307 
   304   Edge
   308   Edge
   305     e1 = g.addEdge(n1, n2),
   309     e1 = g.addEdge(n1, n2),
   306     e2 = g.addEdge(n1, n3);
   310     e2 = g.addEdge(n1, n3);
       
   311   ::lemon::ignore_unused_variable_warning(e2);
   307 
   312 
   308   check(g.valid(n1), "Wrong validity check");
   313   check(g.valid(n1), "Wrong validity check");
   309   check(g.valid(e1), "Wrong validity check");
   314   check(g.valid(e1), "Wrong validity check");
   310   check(g.valid(g.direct(e1, true)), "Wrong validity check");
   315   check(g.valid(g.direct(e1, true)), "Wrong validity check");
   311 
   316