test/graph_test.cc
changeset 362 c6c6e1d863c4
parent 347 160bf92c7cdc
child 368 99f1bdf8f7db
equal deleted inserted replaced
8:861df196cf67 9:66a8da2e39e9
   190 void checkGridGraph(int width, int height) {
   190 void checkGridGraph(int width, int height) {
   191   typedef GridGraph Graph;
   191   typedef GridGraph Graph;
   192   GRAPH_TYPEDEFS(Graph);
   192   GRAPH_TYPEDEFS(Graph);
   193   Graph G(width, height);
   193   Graph G(width, height);
   194 
   194 
   195   check(G.width() == width, "Wrong row number");
   195   check(G.width() == width, "Wrong column number");
   196   check(G.height() == height, "Wrong column number");
   196   check(G.height() == height, "Wrong row number");
   197 
   197 
   198   for (int i = 0; i < width; ++i) {
   198   for (int i = 0; i < width; ++i) {
   199     for (int j = 0; j < height; ++j) {
   199     for (int j = 0; j < height; ++j) {
   200       check(G.col(G(i, j)) == i, "Wrong column");
   200       check(G.col(G(i, j)) == i, "Wrong column");
   201       check(G.row(G(i, j)) == j, "Wrong row");
   201       check(G.row(G(i, j)) == j, "Wrong row");