1.1 --- a/test/graph_test.cc Fri Nov 07 07:18:37 2008 +0000
1.2 +++ b/test/graph_test.cc Fri Nov 07 13:04:54 2008 +0000
1.3 @@ -321,7 +321,7 @@
1.4
1.5 HypercubeGraph G(dim);
1.6 checkGraphNodeList(G, 1 << dim);
1.7 - checkGraphEdgeList(G, dim * (1 << dim-1));
1.8 + checkGraphEdgeList(G, dim * (1 << (dim-1)));
1.9 checkGraphArcList(G, dim * (1 << dim));
1.10
1.11 Node n = G.nodeFromId(dim);
1.12 @@ -330,29 +330,29 @@
1.13 checkGraphIncEdgeList(G, n, dim);
1.14 for (IncEdgeIt e(G, n); e != INVALID; ++e) {
1.15 check( (G.u(e) == n &&
1.16 - G.id(G.v(e)) == G.id(n) ^ (1 << G.dimension(e))) ||
1.17 + G.id(G.v(e)) == (G.id(n) ^ (1 << G.dimension(e)))) ||
1.18 (G.v(e) == n &&
1.19 - G.id(G.u(e)) == G.id(n) ^ (1 << G.dimension(e))),
1.20 + G.id(G.u(e)) == (G.id(n) ^ (1 << G.dimension(e)))),
1.21 "Wrong edge or wrong dimension");
1.22 }
1.23
1.24 checkGraphOutArcList(G, n, dim);
1.25 for (OutArcIt a(G, n); a != INVALID; ++a) {
1.26 check(G.source(a) == n &&
1.27 - G.id(G.target(a)) == G.id(n) ^ (1 << G.dimension(a)),
1.28 + G.id(G.target(a)) == (G.id(n) ^ (1 << G.dimension(a))),
1.29 "Wrong arc or wrong dimension");
1.30 }
1.31
1.32 checkGraphInArcList(G, n, dim);
1.33 for (InArcIt a(G, n); a != INVALID; ++a) {
1.34 check(G.target(a) == n &&
1.35 - G.id(G.source(a)) == G.id(n) ^ (1 << G.dimension(a)),
1.36 + G.id(G.source(a)) == (G.id(n) ^ (1 << G.dimension(a))),
1.37 "Wrong arc or wrong dimension");
1.38 }
1.39 }
1.40
1.41 checkGraphConArcList(G, (1 << dim) * dim);
1.42 - checkGraphConEdgeList(G, dim * (1 << dim-1));
1.43 + checkGraphConEdgeList(G, dim * (1 << (dim-1)));
1.44
1.45 checkArcDirections(G);
1.46