forked from pgRouting/GSoC-pgRouting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bellman_ford_neg_edges-typesCheck.sql
38 lines (28 loc) · 1.47 KB
/
bellman_ford_neg_edges-typesCheck.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
\i setup.sql
SELECT plan(9);
SELECT has_function('pgr_bellmanford');
SELECT todo_start('not implemented yet');
SELECT function_returns('pgr_bellmanford', ARRAY['text','text','bigint','bigint','boolean'],'setof record');
SELECT function_returns('pgr_bellmanford', ARRAY['text','text','bigint','anyarray','boolean'],'setof record');
SELECT function_returns('pgr_bellmanford', ARRAY['text','text','anyarray','bigint','boolean'],'setof record');
SELECT function_returns('pgr_bellmanford', ARRAY['text','text','anyarray','anyarray','boolean'],'setof record');
-- testing column names on the negative edges function
SELECT bag_has(
$$SELECT proargnames from pg_proc where proname = 'pgr_bellmanford'$$,
$$SELECT '{"","","","","directed","seq","path_seq","node","edge","cost","agg_cost"}'::TEXT[] $$
);
SELECT bag_has(
$$SELECT proargnames from pg_proc where proname = 'pgr_bellmanford'$$,
$$SELECT '{"","","","","directed","seq","path_seq","start_vid","node","edge","cost","agg_cost"}'::TEXT[] $$
);
SELECT bag_has(
$$SELECT proargnames from pg_proc where proname = 'pgr_bellmanford'$$,
$$SELECT '{"","","","","directed","seq","path_seq","end_vid","node","edge","cost","agg_cost"}'::TEXT[] $$
);
SELECT bag_has(
$$SELECT proargnames from pg_proc where proname = 'pgr_bellmanford'$$,
$$SELECT '{"","","","","directed","seq","path_seq","start_vid","end_vid","node","edge","cost","agg_cost"}'::TEXT[] $$
);
SELECT todo_end();
SELECT * FROM finish();
ROLLBACK;