diff -r e7f8647ce760 -r e9b4fbe163f5 test/dijkstra_test.cc --- a/test/dijkstra_test.cc Mon Jul 14 15:23:11 2008 +0100 +++ b/test/dijkstra_test.cc Fri Sep 26 09:52:28 2008 +0200 @@ -20,7 +20,6 @@ #include #include #include - #include #include @@ -64,7 +63,6 @@ bool b; DType::DistMap d(G); DType::PredMap p(G); - // DType::PredNodeMap pn(G); LengthMap length; DType dijkstra_test(G,length); @@ -76,7 +74,6 @@ n = dijkstra_test.predNode(n); d = dijkstra_test.distMap(); p = dijkstra_test.predMap(); - // pn = dijkstra_test.predNodeMap(); b = dijkstra_test.reached(n); Path pp = dijkstra_test.path(n); @@ -91,12 +88,21 @@ typedef concepts::ReadMap LengthMap; Digraph g; - dijkstra(g,LengthMap(),Node()).run(); - dijkstra(g,LengthMap()).source(Node()).run(); + bool b; + dijkstra(g,LengthMap()).run(Node()); + b=dijkstra(g,LengthMap()).run(Node(),Node()); dijkstra(g,LengthMap()) - .predMap(concepts::WriteMap()) - .distMap(concepts::WriteMap()) + .predMap(concepts::ReadWriteMap()) + .distMap(concepts::ReadWriteMap()) + .processedMap(concepts::WriteMap()) .run(Node()); + b=dijkstra(g,LengthMap()) + .predMap(concepts::ReadWriteMap()) + .distMap(concepts::ReadWriteMap()) + .processedMap(concepts::WriteMap()) + .path(concepts::Path()) + .dist(VType()) + .run(Node(),Node()); } template @@ -122,7 +128,7 @@ check(dijkstra_test.dist(t)==3,"Dijkstra found a wrong path."); Path p = dijkstra_test.path(t); - check(p.length()==3,"getPath() found a wrong path."); + check(p.length()==3,"path() found a wrong path."); check(checkPath(G, p),"path() found a wrong path."); check(pathSource(G, p) == s,"path() found a wrong path."); check(pathTarget(G, p) == t,"path() found a wrong path."); @@ -132,7 +138,7 @@ Node v=G.target(e); check( !dijkstra_test.reached(u) || (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= length[e]), - "dist(target)-dist(source)-arc_length= " << + "Wrong output. dist(target)-dist(source)-arc_length=" << dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]); }