# HG changeset patch # User alpar # Date 1083913104 0 # Node ID ed0a4de239230adf28919f9a9959be4c0cb0413d # Parent efaa79ee8d1486b7a70b9702a05d059a3538e7c2 An alternative dijkstra_test.cc diff -r efaa79ee8d14 -r ed0a4de23923 src/test/dijkstra_test.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/dijkstra_test.cc Fri May 07 06:58:24 2004 +0000 @@ -0,0 +1,41 @@ +#include +#include +#include + +using namespace hugo; + +const int PET_SIZE =5; + +int main() +{ + + typedef SmartGraph Graph; + + typedef Graph::Edge Edge; + typedef Graph::Node Node; + typedef Graph::EdgeIt EdgeIt; + typedef Graph::NodeIt NodeIt; + typedef Graph::EdgeMap LengthMap; + + Graph G; + Node s, t; + LengthMap cap(G); + + PetStruct ps = addPetersen(G,PET_SIZE); + + for(int i=0;i + dijkstra_test(G, cap); + dijkstra_test.run(s); + + check(dijkstra_test.dist(t)==13,"Dijkstra found a wrong path."); + +} +