Closed vidhan13j07 closed 7 years ago
\i setup.sql
SELECT plan(34);
------------
-- testing from an existing starting vertex to an non-existing destination
-----------
- in directed graph
- with restrictions
PREPARE q1 AS ....
- in indirected graph
- with restrictions
PREPARE q2 AS ....
- in directed graph
- without restrictions
PREPARE q3 AS ....
- in indirected graph
- without restrictions
PREPARE q4 AS ....
@woodbri mentions
A common issue with routing that returns an empty set is when you have a graph that has two+ disconnected networks like: n1-n2 and n3-n4 and you try to route from n1 to n4.
there is no path given the data there is no path so EMPTY SET is this case covered in the unit tests?
I answered: currently the unit tests involve a subset of edges of the sample data, mainly edges 4 & 7 But, I will ask @vidhan13j07 to add edge 17, and make those as unit tests because yes, the unit test also must consider when the graph has more than one component
@cvvergara, Should I create 16 more tests including edge id 17
in the edge set. I think you meant edge id 18
as it is a part of different component http://docs.pgrouting.org/2.2/en/doc/src/developer/sampledata.html
(using edges ids in my comment) the graph you are using is G{4, 7} , so the set edges that you can not use are: {1,2,8,6,10} because those would belong to the same component any other edge is going to be on a different component. Remember you are not using the whole graph for this initial unit tests.
[x] Add tests from an non-existing starting vertex to a non-existing destination in directed graph.
[x] Add tests from an non-existing starting vertex to a non-existing destination in undirected graph.