COIN-OR::LEMON - Graph Library

Changeset 1400:6b79d93e812f in lemon for test/planarity_test.cc


Ignore:
Timestamp:
10/17/18 17:52:11 (9 months ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Planar drawing algorithm now works for less than 3 nodes (#611)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/planarity_test.cc

    r1399 r1400  
    3131using namespace lemon::dim2;
    3232
    33 const int lgfn = 4;
     33const int lgfn = 8;
    3434const std::string lgf[lgfn] = {
     35  "@nodes\n"
     36  "label\n"
     37  "@edges\n"
     38  "     label\n",
     39
     40  "@nodes\n"
     41  "label\n"
     42  "0\n"
     43  "@edges\n"
     44  "     label\n",
     45
     46  "@nodes\n"
     47  "label\n"
     48  "0\n"
     49  "1\n"
     50  "@edges\n"
     51  "     label\n"
     52  "0 1  0\n",
     53
     54  "@nodes\n"
     55  "label\n"
     56  "0\n"
     57  "1\n"
     58  "2\n"
     59  "@edges\n"
     60  "     label\n"
     61  "0 1  0\n"
     62  "1 2  1\n"
     63  "2 0  2\n",
     64
    3565  "@nodes\n"
    3666  "label\n"
     
    137167    }
    138168  }
    139   check(face_num + countNodes(graph) - countConnectedComponents(graph) ==
    140         countEdges(graph) + 1, "Euler test does not passed");
     169
     170  if (face_num != 0) {
     171    check(face_num + countNodes(graph) - countConnectedComponents(graph) ==
     172          countEdges(graph) + 1, "Euler test does not passed");
     173  }
    141174}
    142175
Note: See TracChangeset for help on using the changeset viewer.