| ... | ... |
@@ -94,21 +94,21 @@ |
| 94 | 94 |
check(p.length()==3,"path() found a wrong path."); |
| 95 | 95 |
check(checkPath(G, p),"path() found a wrong path."); |
| 96 | 96 |
check(pathSource(G, p) == s,"path() found a wrong path."); |
| 97 | 97 |
check(pathTarget(G, p) == t,"path() found a wrong path."); |
| 98 | 98 |
|
| 99 | 99 |
|
| 100 |
for(ArcIt e(G); e |
|
| 100 |
for(ArcIt e(G); e!=INVALID; ++e) {
|
|
| 101 | 101 |
Node u=G.source(e); |
| 102 | 102 |
Node v=G.target(e); |
| 103 | 103 |
check( !bfs_test.reached(u) || |
| 104 |
(bfs_test.dist(v) |
|
| 104 |
(bfs_test.dist(v) <= bfs_test.dist(u)+1), |
|
| 105 | 105 |
"Wrong output."); |
| 106 | 106 |
} |
| 107 | 107 |
|
| 108 |
for(NodeIt v(G); v |
|
| 108 |
for(NodeIt v(G); v!=INVALID; ++v) {
|
|
| 109 | 109 |
check(bfs_test.reached(v),"Each node should be reached."); |
| 110 | 110 |
if ( bfs_test.predArc(v)!=INVALID ) {
|
| 111 | 111 |
Arc e=bfs_test.predArc(v); |
| 112 | 112 |
Node u=G.source(e); |
| 113 | 113 |
check(u==bfs_test.predNode(v),"Wrong tree."); |
| 114 | 114 |
check(bfs_test.dist(v) - bfs_test.dist(u) == 1, |
0 comments (0 inline)