test/planarity_test.cc
changeset 1182 6b79d93e812f
parent 1181 1e5da3fc4fbc
     1.1 --- a/test/planarity_test.cc	Tue May 15 14:16:35 2018 +0200
     1.2 +++ b/test/planarity_test.cc	Wed Oct 17 17:52:11 2018 +0200
     1.3 @@ -30,10 +30,40 @@
     1.4  using namespace lemon;
     1.5  using namespace lemon::dim2;
     1.6  
     1.7 -const int lgfn = 4;
     1.8 +const int lgfn = 8;
     1.9  const std::string lgf[lgfn] = {
    1.10    "@nodes\n"
    1.11    "label\n"
    1.12 +  "@edges\n"
    1.13 +  "     label\n",
    1.14 +
    1.15 +  "@nodes\n"
    1.16 +  "label\n"
    1.17 +  "0\n"
    1.18 +  "@edges\n"
    1.19 +  "     label\n",
    1.20 +
    1.21 +  "@nodes\n"
    1.22 +  "label\n"
    1.23 +  "0\n"
    1.24 +  "1\n"
    1.25 +  "@edges\n"
    1.26 +  "     label\n"
    1.27 +  "0 1  0\n",
    1.28 +
    1.29 +  "@nodes\n"
    1.30 +  "label\n"
    1.31 +  "0\n"
    1.32 +  "1\n"
    1.33 +  "2\n"
    1.34 +  "@edges\n"
    1.35 +  "     label\n"
    1.36 +  "0 1  0\n"
    1.37 +  "1 2  1\n"
    1.38 +  "2 0  2\n",
    1.39 +
    1.40 +  "@nodes\n"
    1.41 +  "label\n"
    1.42    "0\n"
    1.43    "1\n"
    1.44    "2\n"
    1.45 @@ -136,8 +166,11 @@
    1.46        ++face_num;
    1.47      }
    1.48    }
    1.49 -  check(face_num + countNodes(graph) - countConnectedComponents(graph) ==
    1.50 -        countEdges(graph) + 1, "Euler test does not passed");
    1.51 +
    1.52 +  if (face_num != 0) {
    1.53 +    check(face_num + countNodes(graph) - countConnectedComponents(graph) ==
    1.54 +          countEdges(graph) + 1, "Euler test does not passed");
    1.55 +  }
    1.56  }
    1.57  
    1.58  void checkKuratowski(const Graph& graph, PE& pe) {