1.1 --- a/test/bfs_test.cc Tue Sep 23 18:42:49 2008 +0200
1.2 +++ b/test/bfs_test.cc Fri Sep 26 12:40:11 2008 +0200
1.3 @@ -54,27 +54,52 @@
1.4 {
1.5 typedef concepts::Digraph Digraph;
1.6 typedef Bfs<Digraph> BType;
1.7 + typedef Digraph::Node Node;
1.8 + typedef Digraph::Arc Arc;
1.9
1.10 Digraph G;
1.11 - Digraph::Node n;
1.12 - Digraph::Arc e;
1.13 + Node s, t;
1.14 + Arc e;
1.15 int l;
1.16 bool b;
1.17 BType::DistMap d(G);
1.18 BType::PredMap p(G);
1.19 + Path<Digraph> pp;
1.20
1.21 - BType bfs_test(G);
1.22 + {
1.23 + BType bfs_test(G);
1.24
1.25 - bfs_test.run(n);
1.26 + bfs_test.run(s);
1.27 + bfs_test.run(s,t);
1.28 + bfs_test.run();
1.29
1.30 - l = bfs_test.dist(n);
1.31 - e = bfs_test.predArc(n);
1.32 - n = bfs_test.predNode(n);
1.33 - d = bfs_test.distMap();
1.34 - p = bfs_test.predMap();
1.35 - b = bfs_test.reached(n);
1.36 + l = bfs_test.dist(t);
1.37 + e = bfs_test.predArc(t);
1.38 + s = bfs_test.predNode(t);
1.39 + b = bfs_test.reached(t);
1.40 + d = bfs_test.distMap();
1.41 + p = bfs_test.predMap();
1.42 + pp = bfs_test.path(t);
1.43 + }
1.44 + {
1.45 + BType
1.46 + ::SetPredMap<concepts::ReadWriteMap<Node,Arc> >
1.47 + ::SetDistMap<concepts::ReadWriteMap<Node,int> >
1.48 + ::SetReachedMap<concepts::ReadWriteMap<Node,bool> >
1.49 + ::SetProcessedMap<concepts::WriteMap<Node,bool> >
1.50 + ::SetStandardProcessedMap
1.51 + ::Create bfs_test(G);
1.52
1.53 - Path<Digraph> pp = bfs_test.path(n);
1.54 + bfs_test.run(s);
1.55 + bfs_test.run(s,t);
1.56 + bfs_test.run();
1.57 +
1.58 + l = bfs_test.dist(t);
1.59 + e = bfs_test.predArc(t);
1.60 + s = bfs_test.predNode(t);
1.61 + b = bfs_test.reached(t);
1.62 + pp = bfs_test.path(t);
1.63 + }
1.64 }
1.65
1.66 void checkBfsFunctionCompile()