Changeset 1283:fc20371677b9 in lemon-0.x for src/test
- Timestamp:
- 03/31/05 15:31:39 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1715
- Location:
- src/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/test/bfs_test.cc
r1220 r1283 18 18 #include <lemon/smart_graph.h> 19 19 #include <lemon/bfs.h> 20 #include <lemon/path.h> 20 21 #include<lemon/concept/graph.h> 21 22 … … 57 58 b = bfs_test.reached(n); 58 59 60 DirPath<Graph> pp(G); 61 bfs_test.getPath(pp,n); 59 62 } 60 63 … … 104 107 check(bfs_test.dist(t)==3,"Bfs found a wrong path. " << bfs_test.dist(t)); 105 108 109 DirPath<Graph> p(G); 110 check(bfs_test.getPath(p,t),"getPath() failed to set the path."); 111 check(p.length()==3,"getPath() found a wrong path."); 112 106 113 107 114 for(EdgeIt e(G); e==INVALID; ++e) { -
src/test/dfs_test.cc
r1233 r1283 18 18 #include <lemon/smart_graph.h> 19 19 #include <lemon/dfs.h> 20 #include <lemon/path.h> 20 21 #include <lemon/concept/graph.h> 21 22 … … 57 58 b = dfs_test.reached(n); 58 59 60 DirPath<Graph> pp(G); 61 dfs_test.getPath(pp,n); 59 62 } 60 63 … … 103 106 dfs_test.run(s); 104 107 108 DirPath<Graph> p(G); 109 check(dfs_test.getPath(p,t),"getPath() failed to set the path."); 110 check(p.length()==dfs_test.dist(t),"getPath() found a wrong path."); 111 105 112 for(NodeIt v(G); v!=INVALID; ++v) { 106 113 check(dfs_test.reached(v),"Each node should be reached."); -
src/test/dijkstra_test.cc
r1220 r1283 18 18 #include <lemon/smart_graph.h> 19 19 #include <lemon/dijkstra.h> 20 #include <lemon/path.h> 20 21 #include <lemon/maps.h> 21 22 #include <lemon/concept/graph.h> … … 60 61 // pn = dijkstra_test.predNodeMap(); 61 62 b = dijkstra_test.reached(n); 62 63 64 DirPath<Graph> pp(G); 65 dijkstra_test.getPath(pp,n); 63 66 } 64 67 … … 115 118 116 119 120 DirPath<Graph> p(G); 121 check(dijkstra_test.getPath(p,t),"getPath() failed to set the path."); 122 check(p.length()==4,"getPath() found a wrong path."); 123 124 117 125 for(EdgeIt e(G); e!=INVALID; ++e) { 118 126 Node u=G.source(e);
Note: See TracChangeset
for help on using the changeset viewer.