Skip to content

Commit

Permalink
fixing pgr_isPlanar pgtap test
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Apr 28, 2024
1 parent c1f29f6 commit 0d52278
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions pgtap/planar/isPlanar/edge_cases.pg
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ PREPARE zeroEdgeTest2 AS
SELECT *
FROM pgr_isPlanar('q1');

RETURN QUERY
SELECT throws_ok('zeroEdgeTest2','XX000','No edges found', '2: throws, since graph is empty');
IF min_version('3.6.2') THEN
RETURN QUERY
SELECT throws_ok('zeroEdgeTest2','XX000','No edges found', '2: throws, since graph is empty');
ELSE
RETURN QUERY
SELECT set_eq('zeroEdgeTest2',$$VALUES('f'::bool) $$, '2: False, since vertex does not exist');
END IF;



-- vertex not present in graph test
Expand All @@ -67,8 +73,14 @@ PREPARE vertexNotPresent4 AS
SELECT *
FROM pgr_isPlanar('q3');

RETURN QUERY
SELECT throws_ok('vertexNotPresent4','XX000','No edges found', '2: throws, since graph is empty');
IF min_version('3.6.2') THEN
RETURN QUERY
SELECT throws_ok('vertexNotPresent4','XX000','No edges found', '2: throws, since graph is empty');
ELSE
RETURN QUERY
SELECT set_eq('vertexNotPresent4',$$VALUES('f'::bool) $$, '4:False, Vertex not present in graph');
END IF;


-- 1 vertex test

Expand Down

0 comments on commit 0d52278

Please sign in to comment.