-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bdAstar] Added pgTAP test for issue1733
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
\i setup.sql | ||
|
||
SELECT plan(3); | ||
|
||
SELECT is_empty( | ||
'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 | ||
FROM edge_table | ||
WHERE source = 100 OR target = 100', | ||
'Vertex 100 does not exist in sample data' | ||
); | ||
|
||
PREPARE q1 AS | ||
SELECT * FROM pgr_bdAstar( | ||
'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 | ||
FROM edge_table', | ||
2, 100, | ||
true, heuristic := 2 | ||
); | ||
|
||
SELECT * FROM lives_ok('q1'); | ||
SELECT * FROM is_empty('q1'); | ||
|
||
|
||
SELECT finish(); |