test/graph_utils_test.cc
changeset 1568 f694f75de683
parent 1459 2ee881cf30a8
child 1728 eb8bb91ba9e2
     1.1 --- a/test/graph_utils_test.cc	Mon Jul 18 15:09:37 2005 +0000
     1.2 +++ b/test/graph_utils_test.cc	Mon Jul 18 15:10:22 2005 +0000
     1.3 @@ -50,15 +50,26 @@
     1.4    ///\file
     1.5    { // checking list graph
     1.6      checkGraphCounters<ListGraph>();
     1.7 +    checkFindEdge<ListGraph>();
     1.8    }
     1.9    { // checking smart graph
    1.10      checkGraphCounters<SmartGraph>();
    1.11 +    checkFindEdge<SmartGraph>();
    1.12    }
    1.13    {
    1.14      int num = 5;
    1.15      FullGraph fg(num);
    1.16      check(countNodes(fg) == num, "FullGraph: wrong node number.");
    1.17 -    check(countEdges(fg) == num*num, "FullGraph: wrong edge number.");    
    1.18 +    check(countEdges(fg) == num*num, "FullGraph: wrong edge number.");
    1.19 +    for (FullGraph::NodeIt src(fg); src != INVALID; ++src) {
    1.20 +      for (FullGraph::NodeIt trg(fg); trg != INVALID; ++trg) {
    1.21 +	ConEdgeIt<FullGraph> con(fg, src, trg);
    1.22 +	check(con != INVALID, "There is no connecting edge.");
    1.23 +	check(fg.source(con) == src, "Wrong source.");
    1.24 +	check(fg.target(con) == trg, "Wrong target.");
    1.25 +	check(++con == INVALID, "There is more connecting edge.");
    1.26 +      }
    1.27 +    }
    1.28    }
    1.29  
    1.30    //check In/OutDegMap (and SnapShot feature)