1.1 --- a/test/planarity_test.cc Mon Jul 16 16:21:40 2018 +0200
1.2 +++ b/test/planarity_test.cc Wed Oct 17 19:14:07 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) {
1.59 @@ -245,13 +278,29 @@
1.60 if (planar) {
1.61 checkEmbedding(graph, pe);
1.62
1.63 - PlanarDrawing<Graph> pd(graph);
1.64 - pd.run(pe.embeddingMap());
1.65 - checkDrawing(graph, pd);
1.66 + {
1.67 + PlanarDrawing<Graph> pd(graph);
1.68 + pd.run(pe.embeddingMap());
1.69 + checkDrawing(graph, pd);
1.70 + }
1.71
1.72 - PlanarColoring<Graph> pc(graph);
1.73 - pc.runFiveColoring(pe.embeddingMap());
1.74 - checkColoring(graph, pc, 5);
1.75 + {
1.76 + PlanarDrawing<Graph> pd(graph);
1.77 + pd.run();
1.78 + checkDrawing(graph, pd);
1.79 + }
1.80 +
1.81 + {
1.82 + PlanarColoring<Graph> pc(graph);
1.83 + pc.runFiveColoring(pe.embeddingMap());
1.84 + checkColoring(graph, pc, 5);
1.85 + }
1.86 +
1.87 + {
1.88 + PlanarColoring<Graph> pc(graph);
1.89 + pc.runFiveColoring();
1.90 + checkColoring(graph, pc, 5);
1.91 + }
1.92
1.93 } else {
1.94 checkKuratowski(graph, pe);