diff -r e746fb14e680 -r 432c54cec63c test/digraph_test.cc --- a/test/digraph_test.cc Tue Aug 18 10:08:28 2009 +0200 +++ b/test/digraph_test.cc Thu Nov 05 08:39:49 2009 +0100 @@ -35,6 +35,9 @@ checkGraphNodeList(G, 0); checkGraphArcList(G, 0); + G.reserveNode(3); + G.reserveArc(4); + Node n1 = G.addNode(), n2 = G.addNode(), @@ -283,6 +286,14 @@ G.addArc(G.addNode(), G.addNode()); snapshot.restore(); + snapshot.save(G); + + checkGraphNodeList(G, 4); + checkGraphArcList(G, 4); + + G.addArc(G.addNode(), G.addNode()); + + snapshot.restore(); checkGraphNodeList(G, 4); checkGraphArcList(G, 4); @@ -375,7 +386,12 @@ void checkFullDigraph(int num) { typedef FullDigraph Digraph; DIGRAPH_TYPEDEFS(Digraph); + Digraph G(num); + check(G.nodeNum() == num && G.arcNum() == num * num, "Wrong size"); + + G.resize(num); + check(G.nodeNum() == num && G.arcNum() == num * num, "Wrong size"); checkGraphNodeList(G, num); checkGraphArcList(G, num * num);